-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·34 lines (26 loc) · 1.22 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
# Arch Linux users: DO NOT USE IF PREVIOUSLY INSTALLED USING pacman. Uninstall through pacman (`pacman -Rs name-grabber`) if you wish you use this script.
# Run within the same directory as name-grabber, main.glade, res, and name-grabber.desktop
# quit if not superuser
if [ "$EUID" -ne 0 ]
then echo "Please run as superuser or with sudo"
exit
fi
# to-do: install needed dependencies before installing name-grabber
# create resource folder in /usr/share
mkdir -p /usr/share/name-grabber
# copy resources into newly created resource folder
cp -i ./name-grabber /usr/share/name-grabber/name-grabber
cp -i ./main.glade /usr/share/name-grabber/main.glade
cp -ir ./res /usr/share/name-grabber/res
cp -i ./name-grabber.desktop /usr/share/name-grabber/name-grabber.desktop
# link name-grabber executable to the /usr/bin folder
if [ ! -f /usr/bin/name-grabber ]; then
ln -s /usr/share/name-grabber/name-grabber /usr/bin/name-grabber
fi
# link launcher icon to /usr/share/applications
if [ ! -f /usr/share/applications/name-grabber.desktop ]; then
ln -s /usr/share/name-grabber/name-grabber.desktop /usr/share/applications/name-grabber.desktop
fi
#report to user that installation is complete
echo Installation complete!