aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/install-redhat.sh
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-02-06 09:53:05 +0100
committerGerd Hoffmann <kraxel@redhat.com>2017-02-06 09:59:46 +0100
commit3d180c1d2087c76b19dbf61d70c98ec54858666c (patch)
treec9f6ab6bef7faa6f08e06c773f7fa65409c3dea0 /scripts/install-redhat.sh
parent70eed02e5870f5cf8b9a5d3bae6db192dd6aab30 (diff)
downloadimagefish-3d180c1d2087c76b19dbf61d70c98ec54858666c.tar.gz
add --force
Diffstat (limited to 'scripts/install-redhat.sh')
-rwxr-xr-xscripts/install-redhat.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts/install-redhat.sh b/scripts/install-redhat.sh
index 315200c..8a2914d 100755
--- a/scripts/install-redhat.sh
+++ b/scripts/install-redhat.sh
@@ -7,7 +7,7 @@ dest=""
tarb=""
tool="dnf"
grps="core"
-rpms=""
+rpms="kernel"
conf=""
######################################################################
@@ -36,7 +36,7 @@ options:
--dest <dir>
what to install
--groups <groups> (default: $grps)
- --packages <rpms>
+ --packages <rpms> (default: $rpms)
package manager setup
--config <repos>
--dnf (default)
@@ -75,6 +75,10 @@ while test "$1" != ""; do
tool="yum"
shift
;;
+ --force)
+ allow_override="yes"
+ shift
+ ;;
-h | --help)
print_help
exit 1
@@ -101,8 +105,12 @@ if test "$conf" != "" -a ! -f "$conf"; then
exit 1
fi
if test "$tarb" != "" -a -f "$tarb"; then
- echo "ERROR: tarball exists: $tarb"
- exit 1
+ if test "$allow_override" = "yes"; then
+ rm -f "$tarb"
+ else
+ echo "ERROR: tarball exists: $tarb"
+ exit 1
+ fi
fi
######################################################################