|
4 | 4 | # Author: Hari Sekhon |
5 | 5 | # Date: 2019-10-16 10:33:03 +0100 (Wed, 16 Oct 2019) |
6 | 6 | # |
7 | | -# https://github.com/harisekhon/pytools |
| 7 | +# https://github.com/harisekhon/devops-python-tools |
8 | 8 | # |
9 | 9 | # License: see accompanying Hari Sekhon LICENSE file |
10 | 10 | # |
|
15 | 15 |
|
16 | 16 | # Alpine / Wget: |
17 | 17 | # |
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 |
19 | 19 | # |
20 | 20 | # Curl: |
21 | 21 | # |
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 |
23 | 23 |
|
24 | 24 | set -eu |
25 | 25 | [ -n "${DEBUG:-}" ] && set -x |
26 | 26 | srcdir="$(dirname "$0")" |
27 | 27 |
|
28 | | -repo="https://github.com/HariSekhon/DevOps-Python-tools" |
| 28 | +repo="https://github.com/HariSekhon/devops-python-tools" |
29 | 29 |
|
30 | 30 | directory="pytools" |
31 | 31 |
|
| 32 | +sudo="" |
| 33 | +[ "$(whoami)" = "root" ] || sudo=sudo |
| 34 | + |
32 | 35 | if [ "$(uname -s)" = Darwin ]; then |
33 | 36 | echo "Bootstrapping Mac" |
34 | 37 | 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 |
36 | 39 | fi |
37 | 40 | elif [ "$(uname -s)" = Linux ]; then |
38 | 41 | echo "Bootstrapping Linux" |
39 | 42 | 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 |
41 | 44 | 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 |
44 | 47 | elif type yum >/dev/null 2>&1; then |
45 | | - yum install -y git make |
| 48 | + $sudo yum install -y git make |
46 | 49 | else |
47 | 50 | echo "Package Manager not found on Linux, cannot bootstrap" |
48 | 51 | exit 1 |
|
0 commit comments