Add apt-get update in raspberry.sh script

Just tried this script and realized that it is likely that it will fail because the apt index is not up to date.

The trivial fix seems to be to add an `apt-get update` before the package installation. It should be harmless also.
This commit is contained in:
Alex Barcelo 2017-01-12 09:58:02 +01:00 committed by Alex Barcelo
parent b9e7f018e2
commit 3cea6e5d0c

View File

@ -36,6 +36,10 @@ fi
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; } function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
function command_exists () { type "$1" &> /dev/null ;} function command_exists () { type "$1" &> /dev/null ;}
# Update before first apt-get
echo -e "\e[96mUpdating packages ...\e[90m"
sudo apt-get update || exit
# Installing helper tools # Installing helper tools
echo -e "\e[96mInstalling helper tools ...\e[90m" echo -e "\e[96mInstalling helper tools ...\e[90m"
sudo apt-get install curl wget git build-essential unzip || exit sudo apt-get install curl wget git build-essential unzip || exit