-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·38 lines (24 loc) · 882 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
34
35
36
37
38
#!/bin/bash
function ln-cfg {
if [[ -e "$2" ]]; then
echo "[Warning] Backing up $2..."
mv -i "$2" "$2.bak"
fi
ln -s "$(pwd)/$1" "$2"
}
cd $(dirname $(readlink -f $0)) # jump to the script directory
# pacman.conf
ln-cfg pacman.conf /etc/pacman.conf
# swap.conf must be placed after the installation of systemd-swap.
# ln-cfg swap.conf /etc/systemd/swap.conf
# earlyoom must be placed after the installation of earlyoom
ln-cfg earlyoom /etc/default/earlyoom
# Network manager dns settings
ln-cfg 10-dns.conf /etc/NetworkManager/conf.d/10-dns.conf
ln-cfg resolv.conf /etc/resolv.conf
# sudoers must be placed after the installation of sudo.
# ln-cfg sudoers /etc/sudoers # This won't work because the sudores file must be owned by root.
# exports must be placed after the installation of nfs-utils.
# ln-cfg exports /etc/exports
# env
ln-cfg env ~/.profile