aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2019-09-14 16:04:21 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2019-09-14 16:04:21 +0200
commita70967e1745459a37ff1c3637c20505f7a9a3a7b (patch)
tree56ef52ab083ead3418c3d9a5329033e3c1dfa087
parentd2f6a13de55d3e4da4c1caeb5d5ee56557dd22ae (diff)
downloadslackupgrade-a70967e1745459a37ff1c3637c20505f7a9a3a7b.tar.gz
slackupgrade-a70967e1745459a37ff1c3637c20505f7a9a3a7b.tar.bz2
Support 32-bit i?86 systems
-rw-r--r--slackware-upgrade-system17
1 files changed, 8 insertions, 9 deletions
diff --git a/slackware-upgrade-system b/slackware-upgrade-system
index 9cea66b..7ba002b 100644
--- a/slackware-upgrade-system
+++ b/slackware-upgrade-system
@@ -38,14 +38,12 @@ keep_file=
function usage() {
cat <<EOF
-usage: $0 [-anqvy] [-d DIRECTORY] [-k FILE] [-s SERIES]
+usage: $0 [-anqvy] [-k FILE] [-s SERIES] [DIRECTORY]
Upgrade Slackware installation
Options are:
-a install all series except kde*
- -d DIRECTORY look for slackware distribution in DIRECTORY;
- default is $rootdir
-h display this help list and exit
-k FILE preserve packages listed in FILE
-n dry-run mode: do nothing, print what would have been done
@@ -93,7 +91,6 @@ while getopts "ad:hknq:s:vy" OPTION
do
case $OPTION in
a) install_all=y;;
- d) rootdir=$OPTARG;;
h) usage
exit 0;;
k) keep_file=$OPTARG;;
@@ -108,11 +105,13 @@ do
done
shift $(($OPTIND - 1))
-if [ $# -gt 0 ]; then
- echo >&2 "$0: unexpected arguments"
- usage >&2
- exit 1
-fi
+case $# in
+ 0) ;;
+ 1) rootdir=$1;;
+ *) echo >&2 "$0: unexpected arguments"
+ usage >&2
+ exit 1
+esac
if [ $(id -u) != "0" ]; then
echo >&2 "$0: must be root"

Return to:

Send suggestions and report system problems to the System administrator.