forked from mesjetiu/PacmanXG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·34 lines (33 loc) · 1.12 KB
/
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
#!/bin/bash
echo "================== Whoami =================="
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root"
exit 1
else echo "You are root. Good. Continue ..."
fi
echo "================== make /opt/pacmanxg =================="
mkdir /opt/pacmanxg
if ! [[ -d "/opt/pacmanxg" && -w "/opt/pacmanxg" ]]; then
echo "::=> Directory does not exist : /opt/pacmanxg"
exit 1
else echo "Directory exists"
fi
echo "================== make /opt/pacmanxg/langs =================="
mkdir /opt/pacmanxg/langs
if ! [[ -d "/opt/pacmanxg/langs" && -w "/opt/pacmanxg/langs" ]]; then
echo "::=> Directory does not exist : /opt/pacmanxg/langs"
exit 1
else echo "Directory exists"
fi
cp ./langs/* /opt/pacmanxg/langs
cp ./* /opt/pacmanxg
cp ./pacmanxg.desktop /usr/share/applications/pacmanxg.desktop
cp ./icon.png /usr/share/pixmaps/pacmanxg.png
chmod 644 /usr/share/pixmaps/pacmanxg.png
chmod 644 /opt/pacmanxg/*
chmod 755 /opt/pacmanxg/langs
chmod 644 /opt/pacmanxg/langs/*
chmod 755 /opt/pacmanxg/dizz.sh
chmod 755 /opt/pacmanxg/ssx
chmod 755 /opt/pacmanxg/pacmanxg
echo "================== Done =================="