Skip to content

Commit

Permalink
Fix argument parsing in install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
safing-bot committed May 30, 2023
1 parent 9bfe0e9 commit 28f6351
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions linux/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -- "$(getopt -u -o uhd:t: -l no-color,no-download,purge,uninstall,no-upgrade,debug,help,assets-url:,start-url:,arch:,tmp-dir: -n 'portmaster-installer' -- "$@")"
TEMP=`getopt -u -o uhd:t: -l no-color,no-download,purge,uninstall,no-upgrade,debug,help,assets-url:,start-url:,arch:,tmp-dir: -n 'portmaster-installer' -- "$@"`
eval set -- "$TEMP"

if [[ $? -ne 0 ]]; then
exit 1
Expand Down Expand Up @@ -293,56 +294,56 @@ fi

while true; do
case "$1" in
--debug )
--debug)
set -x
shift
;;
--assets-url )
--assets-url)
asset_url="$2"
shift 2
;;
--start-url )
--start-url)
start_url="$2"
shift 2
;;
--arch )
--arch)
arch="$2"
shift 2
;;
-t | --tmp-dir )
-t|--tmp-dir)
tmp_dir="$2"
remove_tmp="no"
shift 2
;;
-h | --help )
-h|--help)
print_help
exit 0
;;
--no-upgrade )
--no-upgrade)
upgrade="no"
shift
;;
-u | --uninstall )
-u|--uninstall)
action="uninstall"
shift
;;
--purge )
--purge)
action="purge"
shift
;;
--no-download )
--no-download)
skip_downloads="True"
shift
;;
--no-color )
--no-color)
colorize="no"
shift
;;
-- )
--)
shift
break
;;
* )
*)
break
;;
esac
Expand Down

0 comments on commit 28f6351

Please sign in to comment.