-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstaller.sh
More file actions
executable file
·43 lines (35 loc) · 917 Bytes
/
installer.sh
File metadata and controls
executable file
·43 lines (35 loc) · 917 Bytes
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
#!/bin/sh
set -eu
bin_path="$HOME/.local/bin"
local_path="$HOME/.local/share/linux_scripts"
config_path="$HOME/.config/linux_scripts"
configs="envs"
scripts="bscripts gitman/gitman extra/histrm extra/pdfsplit extra/bright extra/kde_restore_config extra/dmenuwine extra/tmuxhandle avenv/avenv extra/nospaces extra/myip extra/dirln"
case "${1:-}" in
install)
mkdir -p "$bin_path" "$config_path" "$local_path"
for c in $configs; do
cp -- "configs/$c" "$config_path"
echo "installed config: $c"
done
for s in $scripts; do
cp -- "scripts/$s" "$bin_path"
echo "installed: $s"
done
;;
uninstall)
for c in $configs; do
rm -f -- "$config_path/$c" || true
echo "removed config: $c"
done
for s in $scripts; do
base=$(basename "$s")
rm -f -- "$bin_path/$base" || true
echo "removed: $base"
done
;;
*)
echo "usage: $0 {install|uninstall}" >&2
exit 1
;;
esac