-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit_pkg.sh
More file actions
executable file
·86 lines (72 loc) · 2.55 KB
/
init_pkg.sh
File metadata and controls
executable file
·86 lines (72 loc) · 2.55 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
#!/usr/bin/env bash
set -xe
_fonts() {
FONT_VERSION="v3.4.0"
FONT_DIR="$HOME/.local/share/fonts"
FONT_NAMES=("FiraCode" "Hack" "JetBrainsMono" "RobotoMono" "SourceCodePro" "NotoMono")
echo "Downloading and installing Nerd Fonts..."
mkdir -p "$FONT_DIR"
for FONT_NAME in "${FONT_NAMES[@]}"; do
FONT_URL="https://github.com/ryanoasis/nerd-fonts/releases/download/$FONT_VERSION/$FONT_NAME.zip"
wget -q --show-progress "$FONT_URL" -O "$HOME/$FONT_NAME.zip"
if [[ $? -ne 0 ]]; then
echo "Download failed for $FONT_NAME. Please check your network connection or font name!"
continue
fi
unzip -o "$HOME/$FONT_NAME.zip" -d "$FONT_DIR"
rm -f "$HOME/$FONT_NAME.zip"
echo "$FONT_NAME font installed to $FONT_DIR."
done
fc-cache -fv
echo "All Nerd Fonts installation completed!"
}
_deepin() {
PACKAGE_FILE="deepin.list"
if [[ ! -f "package/$PACKAGE_FILE" ]]; then
echo "error:$PACKAGE_FILE not exsit!"
exit 1
fi
echo "deb https://pro-store-packages.uniontech.com/appstore eagle-pro appstore" | sudo tee /etc/apt/sources.list.d/appstoreuos.list
sudo apt update
cat "package/$PACKAGE_FILE" | grep -vE '^\s*#' | grep -vE '^\s*$' | xargs -r sudo apt install -y
}
_arch() {
PACKAGE_FILE="arch.list"
if [[ ! -f "package/$PACKAGE_FILE" ]]; then
echo "error:$PACKAGE_FILE not exsit!"
exit 1
fi
sudo paru -Syu --noconfirm
cat "package/$PACKAGE_FILE" | grep -vE '^\s*#' | grep -vE '^\s*$' | xargs -r sudo paru -Sy --noconfirm
}
_termux() {
PACKAGE_FILE="termux.list"
if [[ ! -f "package/$PACKAGE_FILE" ]]; then
echo "error:$PACKAGE_FILE not exsit!"
exit 1
fi
pkg update
cat "package/$PACKAGE_FILE" | grep -vE '^\s*#' | grep -vE '^\s*$' | xargs -r pkg i -y
vs start sshd
}
case $1 in
deepin)
_deepin
;;
arch)
_arch
;;
termux)
_termux
;;
esac
_fonts
ln -sfn $HOME/dotfiles/conf/vimrc $HOME/.vimrc
ln -sfn $HOME/dotfiles/conf/alacritty $HOME/.config/alacritty
ln -sfn $HOME/dotfiles/conf/ghostty/ $HOME/.config/ghostty
ln -sfn $HOME/dotfiles/conf/kanata $HOME/.config/kanata
ln -sfn $HOME/dotfiles/conf/fcitx5/config $HOME/.config/fcitx5
mkdir -p $HOME/.local/share/fcitx5
ln -sfn $HOME/dotfiles/conf/fcitx5/themes $HOME/.local/share/fcitx5/themes
ln -sfn $HOME/dotfiles/conf/rime $HOME/.local/share/fcitx5/rime
#ln -sfn $HOME/dotfiles/conf/rime $HOME/.config/ibus/rime