1515
1616# Alpine / Wget:
1717#
18- # wget https://raw.githubusercontent.com/HariSekhon/devops-python-tools/master/setup/bootstrap.sh && sh bootstrap. sh
18+ # wget -O- https://raw.githubusercontent.com/HariSekhon/devops-python-tools/master/setup/bootstrap.sh | sh
1919#
2020# Curl:
2121#
22- # curl https://raw.githubusercontent.com/HariSekhon/devops-python-tools/master/setup/bootstrap.sh | sh
22+ # curl https://raw.githubusercontent.com/HariSekhon/devops-python-tools/master/setup/bootstrap.sh | sh
2323
2424set -eu
2525[ -n " ${DEBUG:- } " ] && set -x
@@ -40,16 +40,24 @@ if [ "$(uname -s)" = Darwin ]; then
4040elif [ " $( uname -s) " = Linux ]; then
4141 echo " Bootstrapping on Linux: $repo "
4242 if type apk > /dev/null 2>&1 ; then
43- $sudo apk --no-cache add bash git make curl
43+ $sudo apk --no-cache add bash git make curl wget
4444 elif type apt-get > /dev/null 2>&1 ; then
45+ if [ -n " ${CI:- } " ]; then
46+ export DEBIAN_FRONTEND=noninteractive
47+ fi
4548 opts=" "
4649 if [ -z " ${PS1:- } " ]; then
4750 opts=" -qq"
4851 fi
4952 $sudo apt-get update $opts
50- $sudo apt-get install $opts -y git make curl
53+ $sudo apt-get install $opts -y git make curl wget --no-install-recommends
5154 elif type yum > /dev/null 2>&1 ; then
52- $sudo yum install -y git make curl
55+ if grep -qi ' NAME=.*CentOS' /etc/* release; then
56+ echo " CentOS EOL detected, replacing yum base URL to vault to re-enable package installs"
57+ $sudo sed -i ' s/^[[:space:]]*mirrorlist/#mirrorlist/' /etc/yum.repos.d/CentOS-Linux-*
58+ $sudo sed -i ' s|^#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|' /etc/yum.repos.d/CentOS-Linux-*
59+ fi
60+ $sudo yum install -y git make curl wget
5361 else
5462 echo " Package Manager not found on Linux, cannot bootstrap"
5563 exit 1
0 commit comments