-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·33 lines (27 loc) · 940 Bytes
/
install.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
#!/usr/bin/env bash
. common.sh
function main()
{
if [[ $1 == "--uninstall" ]]; then
uninstall "$SCRIPT_DIR/src" "$HOME" "." "^(config)"
uninstall "$SCRIPT_DIR/src/config" "$HOME/.config"
elif [[ $# -eq 0 ]]; then
echo "Pulling git submodules..."
git submodule update --init
echo "Installing rofi fonts..."
# rofi widget fonts
cp -n -r ./src/config/rofi/rofi/fonts/* ~/.local/share/fonts/
echo "Installing config files..."
# ensure that $BACKUP_DIR exists
mkdir -p "$BACKUP_DIR"
install "$SCRIPT_DIR/src" "$HOME" "." "^(config|system|local|nixos)"
install "$SCRIPT_DIR/src/config" "$HOME/.config" "" "^(ibus)"
install "$SCRIPT_DIR/src/config/ibus/rime/" "$HOME/.config/ibus/rime"
install "$SCRIPT_DIR/src/local/bin" "$HOME/.local/bin/"
install "$SCRIPT_DIR/src/local/share/applications" "$HOME/.local/share/applications/"
echo "Done."
else
echo "Usage: ./install.sh [--uninstall]"
fi
}
main "$@"