Skip to content

Commit

Permalink
Merge pull request OpenBazaar#1073 from Jchase2/arch_ask_user_update
Browse files Browse the repository at this point in the history
Asking user if we should upgrade on arch install.
  • Loading branch information
hoffmabc committed Nov 25, 2014
2 parents 1a8daa5 + 74f5191 commit 9254c79
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,13 @@ function installArch {
#print commands
set -x

sudo pacman -Sy
echo "Some packages and dependencies may fail to install if your package list is out of date."
echo "Would you like to upgrade your system now? "
if confirm ; then
sudo pacman -Syu
else
echo "Continuing."
fi
# sudo pacman -S --needed base-devel
# Can conflict with multilib packages. Uncomment this line if you don't already have base-devel installed
sudo pacman -S --needed python2 python2-pip python2-virtualenv python2-pyzmq rng-tools libjpeg sqlite3 openssl
Expand All @@ -150,10 +156,10 @@ function installArch {
function confirm {
# call with a prompt string or use a default Y
read -r -p "Are you sure? [Y/n] " response
if [[ $response =~ [nN](o)* ]]; then
return 1
else
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
return 0
else
return 1
fi
}

Expand Down

0 comments on commit 9254c79

Please sign in to comment.