-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall_packages.sh
93 lines (71 loc) · 2.71 KB
/
install_packages.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
# Enable Parallel Downloading
printf "\nParallelDownloads = 20\n" >> /etc/pacman.conf
# Enable the community [multilib] repository
printf "\n[multilib]\n%s\n" 'Include = /etc/pacman.d/mirrorlist' >> /etc/pacman.conf
# Enable the archlinuxcn repo
printf "\n[archlinuxcn]\n%s\n" 'Server = https://repo.archlinuxcn.org/$arch' >> /etc/pacman.conf
# Generate pacman keys
pacman-key --init
# Install archlinuxcn keys
pacman -Sy --noconfirm archlinuxcn-keyring
# Upgrade
pacman -Syyu --needed --noconfirm 2>&1 | grep -v "warning: could not get file information"
# Install Basic Packages
pacman -Sy --needed --noconfirm \
sudo nano git curl wget rsync aria2 rclone \
python3 python-pip zip systemd cmake make \
neofetch speedtest-cli inetutils cpio repo \
jdk8-openjdk lzip dpkg openssl ccache dbus \
libelf base-devel openssh lz4 jq go ncurses \
bison flex ninja uboot-tools z3 glibc dpkg \
multilib-devel bc htop python-setuptools \
util-linux man-pages zsh dbus neovim
# More Packages
pacman -Sy --needed --noconfirm \
tmate tmux screen mlocate unace unrar p7zip \
sharutils uudeview arj cabextract file-roller \
dtc brotli axel gawk detox clang gcc gcc-libs \
flatpak libxcrypt-compat lld llvm
# Downgrade `unzip` - from archlinuxcn
yes | pacman -S archlinuxcn/unzip
# archlinuxcn packages
pacman -S --needed --noconfirm \
python2 yay
# python and pip version
python --version; pip --version
# Install Some pip packages
pip install \
twrpdtgen telegram-send backports.lzma docopt \
extract-dtb protobuf pycrypto docopt zstandard \
setuptools future requests humanize clint lz4 \
pycryptodome
# pip git packages
pip install \
git+https://github.com/samloader/samloader.git
# Create a non-root user for AUR
useradd -m -G wheel -s /bin/bash testuser
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# AUR Packages
sudo -u testuser yay -S --needed --noconfirm \
rename
# Try to update yay
sudo -u testuser yay -S --noconfirm yay
# Update ZSTD v1.5.2-8
wget https://github.com/dakkshesh07/zstd-pkgbuild/releases/download/1.5.2-8/zstd-1.5.2-8-x86_64.pkg.tar.zst
pacman -U --noconfirm zstd-1.5.2-8-x86_64.pkg.tar.zst
# zsh
chsh -s /bin/zsh root
sh -c "$(curl -sL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Setup systemd
find /etc/systemd/system /lib/systemd/system -path '*.wants/*' -not -name '*dbus*' -not -name '*journald*' -not -name '*systemd-tmpfiles*' -not -name '*systemd-user-sessions*' -exec rm -rf {} \;
systemctl set-default multi-user.target
# Setup the Android Build Environment
cd /tmp/scripts
sudo chmod -R a+rwx .
sudo -u testuser bash ./android_build_env.sh
cd -
# Setup Android Tools
sudo bash /tmp/scripts/android_tools_setup.sh
# Replace vim with neovim
ln -sf /usr/bin/{n,}vim