diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2017-02-06 09:53:05 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-02-06 09:59:46 +0100 |
commit | 3d180c1d2087c76b19dbf61d70c98ec54858666c (patch) | |
tree | c9f6ab6bef7faa6f08e06c773f7fa65409c3dea0 /scripts/install-redhat.sh | |
parent | 70eed02e5870f5cf8b9a5d3bae6db192dd6aab30 (diff) | |
download | imagefish-3d180c1d2087c76b19dbf61d70c98ec54858666c.tar.gz |
add --force
Diffstat (limited to 'scripts/install-redhat.sh')
-rwxr-xr-x | scripts/install-redhat.sh | 16 |
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 ###################################################################### |