mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Fix handling of command-line options
This commit is contained in:
parent
3404aeebe0
commit
83e6f60cb7
@ -8,25 +8,6 @@ raspap_dir="/etc/raspap"
|
||||
raspap_user="www-data"
|
||||
webroot_dir="/var/www/html"
|
||||
version=`sed 's/\..*//' /etc/debian_version`
|
||||
assume_yes=0
|
||||
|
||||
positional=()
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-y|--yes|--assume-yes)
|
||||
assume_yes=1
|
||||
apt_option="-y"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
*) # unknown option
|
||||
shift # past argument
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Determine Raspbian version, set default home location for lighttpd and
|
||||
# php package to install
|
||||
|
@ -2,6 +2,25 @@ UPDATE_URL="https://raw.githubusercontent.com/billz/raspap-webgui/master/"
|
||||
wget -q ${UPDATE_URL}/installers/common.sh -O /tmp/raspapcommon.sh
|
||||
source /tmp/raspapcommon.sh && rm -f /tmp/raspapcommon.sh
|
||||
|
||||
assume_yes=0
|
||||
positional=()
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-y|--yes|--assume-yes)
|
||||
assume_yes=1
|
||||
apt_option="-y"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
*) # unknown option
|
||||
shift # past argument
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
function update_system_packages() {
|
||||
install_log "Updating sources"
|
||||
sudo apt-get update || install_error "Unable to update package list"
|
||||
|
Loading…
Reference in New Issue
Block a user