-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
58 lines (48 loc) · 1.6 KB
/
install.sh
File metadata and controls
58 lines (48 loc) · 1.6 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
#!/usr/bin/env bash
_c_magneta="\e[95m"
_c_green="\e[32m"
_c_red="\e[31m"
_c_blue="\e[34m"
RST="\e[0m"
die() { echo -e "${_c_red}[E] ${*}${RST}";exit 1;:;}
warn() { echo -e "${_c_red}[W] ${*}${RST}";:;}
shout() { echo -e "${_c_blue}[-] ${*}${RST}";:;}
lshout() { echo -e "${_c_blue}-> ${*}${RST}";:;}
msg() { echo -e "${*} \e[0m" >&2;:;}
ICONS_DIR="/usr/share/icons"
THEME_DIR="/usr/share/themes"
BACKGROUND_DIR="/usr/share/backgrounds"
# USER DIR
LOCAL_DIR="$HOME/.local"
LOCAL_CONFIG="$HOME/.config"
LOCAL_VNC="$HOME/.vnc"
echo -e "${_c_magneta}UDROID XFCE4${RST}"
shout "Installing icons..."
cp -r ./usr/share/icons/* $ICONS_DIR || {
die "Failed to install icons"
}
shout "Installing themes..."
cp -r ./usr/share/themes/* $THEME_DIR || {
die "Failed to install themes"
}
shout "Installing backgrounds..."
cp -r ./usr/share/backgrounds/* $BACKGROUND_DIR || {
die "Failed to install backgrounds"
}
shout "Installing local directories..."
cp -r .local "$LOCAL_DIR" || die "Failed to install local directories"
cp -r .config "$LOCAL_CONFIG" || die "Failed to install local directories"
cp -r .vnc "$LOCAL_VNC" || die "Failed to install local directories"
# add user dirs
[[ ! -d ~/Desktop ]] && mkdir ~/Desktop
[[ ! -d ~/Download ]] && mkdir ~/Download
[[ ! -d ~/Templates ]] && mkdir ~/Templates
[[ ! -d ~/public ]] && mkdir ~/public
[[ ! -d ~/Documents ]] && mkdir ~/Documents
[[ ! -d ~/Music ]] && mkdir ~/Music
[[ ! -d ~/Pictutes ]] && mkdir ~/Pictutes
[[ ! -d ~/Videos ]] && mkdir ~/Videos
chown -Rv $USER:$USER .config
chown -Rv $USER:$USER .local
chown -Rv $USER:$USER .vnc
chmod +x .vnc/xstartup