-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·206 lines (186 loc) · 7.14 KB
/
install.sh
File metadata and controls
executable file
·206 lines (186 loc) · 7.14 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
echo "Setting timezone..."
sudo timedatectl set-timezone UTC
sudo apt update
sudo apt install -y \
dotnet10 \
aria2 \
ffmpeg \
apt-file \
ibus-rime \
docker.io \
fwupd \
pcp \
nvme-cli \
git \
htop \
python3-pip \
python3-venv \
bc \
bison \
build-essential \
ccache \
clang \
cpio \
dwarves \
flex \
gcc \
git \
gzip \
libcap-dev \
libelf-dev \
liblz4-dev \
libncurses-dev \
libssl-dev \
libudev-dev \
libzstd-dev \
lz4 \
fastfetch \
inxi \
python3 \
python3-dev \
python3-distutils-extra \
python3-setuptools \
xz-utils \
zstd
sudo ubuntu-drivers autoinstall
# System no hibernate
sudo systemctl mask hibernate.target hybrid-sleep.target
# Firmware
sudo fwupdmgr refresh
sudo fwupdmgr get-updates
sudo fwupdmgr update
# IBus Rime Config.
zip=https://gitlab.aiursoft.com/anduin/anduinos-rime/-/archive/master/anduinos-rime-master.zip
wget $zip -O anduinos-rime.zip && unzip anduinos-rime.zip && rm anduinos-rime.zip
rsync -Aavx --update --delete ./anduinos-rime-master/assets/ ~/.config/ibus/rime/
rm -rf anduinos-rime-master
flatpak install -y flathub com.google.Chrome
flatpak install -y flathub com.bitwarden.desktop
flatpak install -y flathub com.github.iwalton3.jellyfin-media-player
flatpak install -y flathub com.nextcloud.desktopclient.nextcloud
flatpak install -y flathub chat.revolt.RevoltDesktop
flatpak install -y flathub com.qq.QQ
flatpak install -y flathub com.discordapp.Discord
flatpak install -y flathub com.mattjakeman.ExtensionManager
flatpak install -y flathub com.google.EarthPro
flatpak install -y flathub com.obsproject.Studio
flatpak install -y flathub fr.handbrake.ghb
flatpak install -y flathub com.spotify.Client
flatpak install -y flathub com.tencent.WeChat
flatpak install -y flathub com.valvesoftware.Steam
flatpak install -y flathub io.github.shiftey.Desktop
flatpak install -y flathub net.agalwood.Motrix
flatpak install -y flathub org.musescore.MuseScore
flatpak install -y flathub org.qbittorrent.qBittorrent
flatpak install -y flathub org.signal.Signal
flatpak install -y flathub org.inkscape.Inkscape
flatpak install -y flathub org.gnome.Boxes
flatpak install -y flathub org.kde.krita
flatpak install -y flathub org.mozilla.Thunderbird
flatpak install -y flathub io.missioncenter.MissionCenter
flatpak install -y flathub com.getpostman.Postman
flatpak install -y flathub org.shotcut.Shotcut
flatpak install -y flathub org.blender.Blender
flatpak install -y flathub org.videolan.VLC
flatpak install -y flathub com.wps.Office
flatpak install -y flathub org.chromium.Chromium
flatpak install -y flathub com.dosbox_x.DOSBox-X
flatpak install -y flathub com.mojang.Minecraft
flatpak install -y flathub org.codeblocks.codeblocks
flatpak install -y flathub org.gnome.Epiphany
flatpak install -y flathub org.stellarium.Stellarium
flatpak install -y flathub com.mattjakeman.ExtensionManager
flatpak install -y flathub org.kde.kdenlive
flatpak install -y flathub io.gitlab.adhami3310.Impression
flatpak install -y flathub io.github.thetumultuousunicornofdarkness.cpu-x
flatpak install -y flathub com.jeffser.Alpaca
flatpak install -y flathub com.belmoussaoui.Decoder
flatpak install -y flathub com.yubico.yubioath
flatpak install -y flathub org.sqlitebrowser.sqlitebrowser
flatpak install -y flathub io.bassi.Amberol
# Node
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg --yes
NODE_MAJOR=24
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt update
sudo apt install nodejs -y
# code
cd ~
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo apt update
sudo apt install code -y
# qget
echo '# generated by anduinos
alias qget="aria2c -c -s 16 -x 16 -k 1M -j 16"
' >> ~/.bashrc
source ~/.bashrc
# Microsoft
echo "This is a hack here. This is because Microsoft's repo is soooooooo stupid that it mixed up the .NET SDK!"
UB_VERSION=$(lsb_release -rs)
wget -q "https://packages.microsoft.com/config/ubuntu/$UB_VERSION/packages-microsoft-prod.deb"
sudo dpkg -i ./packages-microsoft-prod.deb
rm ./packages-microsoft-prod.deb
sudo apt update
sudo apt install powershell -y
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
# Powershell Profile
URL="https://gitlab.aiursoft.com/anduin/reimage-windows/-/raw/master/PROFILE_LINUX.ps1"
mkdir -p ~/.config
mkdir -p ~/.config/powershell
curl "$URL" --output - > ~/.config/powershell/Microsoft.PowerShell_profile.ps1
echo "Press Enter when NextCloud is set up."
# XRay
echo "Installing xray..."
sudo bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install
sudo cp ~/Nextcloud/Storage/XRay/xray.json /usr/local/etc/xray/config.json
sudo systemctl restart xray.service
#echo "Setting system proxy settings to use xray..."
#export http_proxy="http://localhost:10809/"
#export https_proxy="http://localhost:10809/"
# Repos
echo "Adding repos..."
mkdir ~/Source > /dev/null 2>&1
mkdir ~/Source/Repos > /dev/null 2>&1
# Git
echo "Setting git..."
git config --global user.email "anduin@aiursoft.com"
git config --global user.name "Anduin Xue"
# Dotnet tools
function TryInstallDotnetTool {
toolName=$1
globalTools=$(dotnet tool list --global)
if [[ $globalTools =~ $toolName ]]; then
echo "$toolName is already installed. Updating it.."
dotnet tool update --global $toolName --interactive --add-source "https://nuget.aiursoft.com/v3/index.json" 2>/dev/null
else
echo "$toolName is not installed. Installing it.."
if ! dotnet tool install --global $toolName --interactive --add-source "https://nuget.aiursoft.com/v3/index.json" 2>/dev/null; then
echo "$toolName failed to be installed. Trying updating it.."
dotnet tool update --global $toolName --interactive --add-source "https://nuget.aiursoft.com/v3/index.json" 2>/dev/null
fi
fi
}
TryInstallDotnetTool "dotnet-ef"
TryInstallDotnetTool "Anduin.Parser"
TryInstallDotnetTool "Aiursoft.Static"
TryInstallDotnetTool "Anduin.HappyRecorder"
~/.dotnet/tools/happy-recorder config set-db-location --path ~/Nextcloud/Storage/HappyRecords/
TryInstallDotnetTool "Aiursoft.NugetNinja"
TryInstallDotnetTool "Aiursoft.Dotlang"
TryInstallDotnetTool "Aiursoft.DotDownload"
TryInstallDotnetTool "Aiursoft.NiBot"
TryInstallDotnetTool "JetBrains.ReSharper.GlobalTools"
TryInstallDotnetTool "Aiursoft.Voyager"
TryInstallDotnetTool "Aiursoft.FileLock"
TryInstallDotnetTool "Aiursoft.NetworkTest"
sudo ln -s ~/Nextcloud/ ~/Desktop/
sudo ln -s ~/Source/Repos/ ~/Desktop/
sudo apt install python3-apt python3-regex -y
wget https://github.com/davidfoerster/aptsources-cleanup/releases/download/v0.1.7.5.2/aptsources-cleanup.pyz
chmod +x aptsources-cleanup.pyz
sudo bash -c "echo all | ./aptsources-cleanup.pyz --yes"
rm aptsources-cleanup.pyz