36 lines
1.5 KiB
Bash
Executable File
36 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
if [ ! $(id -u) -eq 0 ]; then
|
|
printf "Run This File As Root User\n"
|
|
exit 1
|
|
fi
|
|
|
|
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 findutils grep dpkg musl libffi gawk sed sharutils \
|
|
wget curl aria2 ca-certificates gzip cpio bzip2 libbz2 lz4 xz-dev xz xz-libs zlib lzo lzop brotli tar zstd zstd-dev \
|
|
libxml2 libfdt dtc-dev python3-dev openssh openssl libcrypto1.1 libssl1.1 gnupg detox xxd libgcc libstdc++
|
|
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 xxd
|
|
fi
|
|
|
|
if [ $? -eq 0 ]; then
|
|
wget -q -O get-pip.py https://github.com/pypa/get-pip/raw/master/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 pycrypto pycryptodome docopt
|
|
fi
|
|
|