Invert downloadBinaries logic to noPicoPkg

We need to conditionally pass -c to other scripts if we don't want
picopkg downloads.  That's totally fine, but that's easier to do in bash
if something is set vs. unset.  If set you can use :+, so that's
desirable.
This commit is contained in:
T. Joseph Carter 2018-05-05 13:14:43 -07:00
parent 3431bfa812
commit c260ff9d74

View File

@ -51,7 +51,7 @@ echo "A2CLOUD version installed: ${installedVersion:-None}"
### A2CLOUD: Process command line args ### A2CLOUD: Process command line args
buildA2CloudDisk= buildA2CloudDisk=
downloadBinaries=1 noPicoPkg=
skipRepoUpdate= skipRepoUpdate=
restartPrompt= restartPrompt=
autoAnswerYes= autoAnswerYes=
@ -64,7 +64,7 @@ while [[ $1 ]]; do
buildA2CloudDisk=1 buildA2CloudDisk=1
elif [[ $1 == "-c" ]]; then elif [[ $1 == "-c" ]]; then
shift shift
downloadBinaries= noPicoPkg=1
elif [[ $1 == "-r" ]]; then elif [[ $1 == "-r" ]]; then
shift shift
skipRepoUpdate="-r" skipRepoUpdate="-r"
@ -719,8 +719,7 @@ fi
# Install Comm Tools # Install Comm Tools
# FIXME: Interim refactoring # FIXME: Interim refactoring
. "$a2cSource/scripts/install_comm_tools" . "$a2cSource/scripts/install_comm_tools" ${noPicoPkg:+-c}
if [[ $installEmulators ]]; then if [[ $installEmulators ]]; then
@ -731,7 +730,7 @@ if [[ $installEmulators ]]; then
echo "A2CLOUD: Installing GSport..." echo "A2CLOUD: Installing GSport..."
cd /tmp/a2cloud-install cd /tmp/a2cloud-install
if [[ $downloadBinaries ]]; then if [[ ! $noPicoPkg ]]; then
### Emulators: GSport: Install pre-built binaries ### Emulators: GSport: Install pre-built binaries
sudo apt-get -y install libpcap0.8 &> /dev/null sudo apt-get -y install libpcap0.8 &> /dev/null
sudo apt-get -y clean sudo apt-get -y clean
@ -843,7 +842,7 @@ if [[ $installEmulators ]]; then
if ! hash linapple 2> /dev/null; then if ! hash linapple 2> /dev/null; then
echo "A2CLOUD: Installing LinApple..." echo "A2CLOUD: Installing LinApple..."
cd /tmp/a2cloud-install cd /tmp/a2cloud-install
if [[ $downloadBinaries ]]; then if [[ ! $noPicoPkg ]]; then
### Emulators: LinApple: Install pre-built binaries ### Emulators: LinApple: Install pre-built binaries
wget -qO- "${a2cBinaryURL}/picopkg/linapple-${ras2_os}_${ras2_arch}.tgz" | sudo tar Pzx wget -qO- "${a2cBinaryURL}/picopkg/linapple-${ras2_os}_${ras2_arch}.tgz" | sudo tar Pzx
fi fi
@ -878,7 +877,7 @@ fi
# Install Archive Tools # Install Archive Tools
# FIXME: Interim refactoring # FIXME: Interim refactoring
. "$a2cSource/scripts/install_archive_tools" . "$a2cSource/scripts/install_archive_tools" ${noPicoPkg:+-c}
# add shortcuts to LXDE desktop # add shortcuts to LXDE desktop
if [[ -f /usr/bin/X ]]; then if [[ -f /usr/bin/X ]]; then