forked from adi1090x/dynamic-wallpaper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·46 lines (40 loc) · 996 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
39
40
41
42
43
44
45
46
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
# Colors
R='\033[1;31m'
B='\033[1;34m'
C='\033[0;36m'
G='\033[1;32m'
W='\033[1;37m'
Y='\033[1;33m'
# Path
DIR="$(pwd)"
case "$OSTYPE" in
linux*) DES="/usr/share" ;;
*) DES="/usr/share" ;;
esac
case "$OSTYPE" in
linux*) BIN="/usr/bin" ;;
*) BIN="/usr/bin" ;;
esac
case "$OSTYPE" in
linux*) SUDO="sudo" ;;
*) SUDO="sudo" ;;
esac
echo
echo -e $Y" [*] Installing... "$C
echo
# delete old dir if already exist
if [[ -d $DES/dynamic-wallpaper ]]; then
$SUDO rm -rf $DES/dynamic-wallpaper
fi
$SUDO mkdir -p $DES/dynamic-wallpaper && $SUDO cp -r $DIR/images $DES/dynamic-wallpaper && $SUDO cp -r $DIR/dwall.sh $DES/dynamic-wallpaper
$SUDO chmod +x $DES/dynamic-wallpaper/dwall.sh
# delete executable if already exist
if [[ -f $BIN/dwall ]]; then
$SUDO rm $BIN/dwall
fi
$SUDO ln -s $DES/dynamic-wallpaper/dwall.sh $BIN/dwall
echo
echo -e $Y" [*] Installed. Execute 'dwall' to Run."$C
echo