-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
executable file
·40 lines (38 loc) · 1.87 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env sh
if [ ! $(id -u) -eq 0 ]; then
printf "Run This File As Root User\n"
exit 1
fi
#Make files executable
chmod +x utils/erofsfuse
chmod +x utils/lpunpack.py
if grep -q ^ID=alpine$ /etc/os-release; then
if ! grep -q ".*alpine\/edge" /etc/apk/repositories; then
{
printf "http://dl-cdn.alpinelinux.org/alpine/edge/main\n"
printf "http://dl-cdn.alpinelinux.org/alpine/edge/community\n"
printf "http://dl-cdn.alpinelinux.org/alpine/edge/testing\n"
} >> /etc/apk/repositories
fi
apk update -q --progress
apk add --progress --no-cache --purge --update-cache \
bash bash-completion binutils coreutils scanelf ncurses ncurses-dev findutils grep dpkg musl-dev libffi gawk sed file sharutils xterm \
wget curl aria2 ca-certificates gzip cpio bzip2 libbz2 lz4 xz-dev xz xz-libs zlib simg2img lzo lzop brotli tar zstd zstd-dev p7zip \
gcc libgcc libstdc++ linux-headers libc-dev git libxml2 libfdt dtc-dev python3-dev openssh openssl libcrypto1.1 libssl1.1 gnupg detox xxd
elif grep -q ^ID_LIKE=debian$ /etc/os-release; then
sed 's/main$/main universe/' /etc/apt/sources.list 1>/dev/null
apt-get update -qy
apt-get install -qy --show-progress coreutils build-essential gawk git-core sharutils uudeview mpack p7zip-full p7zip-rar \
gzip cpio bzip2 liblz4-dev liblz4-tool liblzma-dev xz-utils lzma lzop \
libxml2 libfdt-dev python3-dev aria2 detox brotli zstd libzstd-dev openssl android-sdk-libsparse-utils xxd
fi
if [ $? -eq 0 ]; then
wget -q -O get-pip.py https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py --upgrade --disable-pip-version-check --no-cache-dir
rm -f get-pip.py
pip3 install future requests humanize clint backports.lzma lz4 zstandard protobuf pycryptodome docopt pycryptodomex
fi
if ! command -v lab &> /dev/null
then
curl -s https://raw.githubusercontent.com/zaquestion/lab/master/install.sh | sudo bash #install lab, a gitlab command-line client
fi