-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·37 lines (31 loc) · 1020 Bytes
/
install
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
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
echo "Copying files"
for I in share/manpagesgui share/man bin share/applications
do
mkdir -p "/usr/$I"
done
for I in LICENSE README.md __init__.py manpagesgui.py i18n png uninstall
do
cp -rf $I /usr/share/manpagesgui/
done
cp -rf man/* $pkgdir/usr/share/man/
cp -f extra/manpagesgui.desktop /usr/share/applications/
echo "Create shortcut"
chmod +x /usr/share/manpagesgui/uninstall
chmod +x /usr/share/manpagesgui/manpagesgui.py
ln -sf /usr/share/manpagesgui/manpagesgui.py /usr/bin/manpagesgui
echo "Rebuild man database"
mandb -q
if [ ${LANG:0:2} != "" ] && [ ${LANG:0:2} != "en" ] && [ ${LANG:0:2} != "fr" ]; then
echo
echo "This program is not yet translated to your language (${LANG:0:2})."
echo "If you wish, you can change that (https://github.com/ElMoribond/manpagesgui/blob/master/README.md)."
fi
echo
echo "Uninstallable with 'sudo /usr/share/manpagesgui/uninstall'"
echo
echo "Installation Complete"