Skip to content

Commit 93f6922

Browse files
committed
updated bootstrap.sh
1 parent fd08120 commit 93f6922

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

setup/bootstrap.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Author: Hari Sekhon
55
# Date: 2019-10-16 10:33:03 +0100 (Wed, 16 Oct 2019)
66
#
7-
# https://github.com/harisekhon/pytools
7+
# https://github.com/harisekhon/devops-python-tools
88
#
99
# License: see accompanying Hari Sekhon LICENSE file
1010
#
@@ -15,34 +15,37 @@
1515

1616
# Alpine / Wget:
1717
#
18-
# wget https://raw.githubusercontent.com/HariSekhon/DevOps-Python-tools/master/setup/bootstrap.sh && sh bootstrap.sh
18+
# wget https://raw.githubusercontent.com/HariSekhon/devops-python-tools/master/setup/bootstrap.sh && sh bootstrap.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

2424
set -eu
2525
[ -n "${DEBUG:-}" ] && set -x
2626
srcdir="$(dirname "$0")"
2727

28-
repo="https://github.com/HariSekhon/DevOps-Python-tools"
28+
repo="https://github.com/HariSekhon/devops-python-tools"
2929

3030
directory="pytools"
3131

32+
sudo=""
33+
[ "$(whoami)" = "root" ] || sudo=sudo
34+
3235
if [ "$(uname -s)" = Darwin ]; then
3336
echo "Bootstrapping Mac"
3437
if ! type brew >/dev/null 2>&1; then
35-
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install | ruby
38+
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install | $sudo ruby
3639
fi
3740
elif [ "$(uname -s)" = Linux ]; then
3841
echo "Bootstrapping Linux"
3942
if type apk >/dev/null 2>&1; then
40-
apk --no-cache add bash git make
43+
$sudo apk --no-cache add bash git make
4144
elif type apt-get >/dev/null 2>&1; then
42-
apt-get update
43-
apt-get install -y git make
45+
$sudo apt-get update
46+
$sudo apt-get install -y git make
4447
elif type yum >/dev/null 2>&1; then
45-
yum install -y git make
48+
$sudo yum install -y git make
4649
else
4750
echo "Package Manager not found on Linux, cannot bootstrap"
4851
exit 1

0 commit comments

Comments
 (0)