mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #18142 from ekuric/mkimage
mkimage-yum.sh to support dnf
This commit is contained in:
commit
8cd356630a
1 changed files with 5 additions and 1 deletions
|
@ -11,13 +11,17 @@ usage() {
|
||||||
$(basename $0) [OPTIONS] <name>
|
$(basename $0) [OPTIONS] <name>
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
-y <yumconf> The path to the yum config to install packages from. The
|
-y <yumconf> The path to the yum config to install packages from. The
|
||||||
default is /etc/yum.conf.
|
default is /etc/yum.conf for Centos/RHEL and /etc/dnf/dnf.conf for Fedora
|
||||||
EOOPTS
|
EOOPTS
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# option defaults
|
# option defaults
|
||||||
yum_config=/etc/yum.conf
|
yum_config=/etc/yum.conf
|
||||||
|
if [ -f /etc/dnf/dnf.conf ] && command -v dnf &> /dev/null; then
|
||||||
|
yum_config=/etc/dnf/dnf.conf
|
||||||
|
alias yum=dnf
|
||||||
|
fi
|
||||||
while getopts ":y:h" opt; do
|
while getopts ":y:h" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
y)
|
y)
|
||||||
|
|
Loading…
Reference in a new issue