mirror of
https://github.com/vikstrous/pirate-get
synced 2025-01-10 10:04:21 +01:00
better installer and uninstaller
This commit is contained in:
parent
68fa7c8d78
commit
00f40343ed
23
install.sh
23
install.sh
@ -1 +1,22 @@
|
|||||||
cp pirate-get.py /usr/bin/pirate-get
|
#!/usr/bin/sh
|
||||||
|
if [ "$UID" -ne 0 ]
|
||||||
|
then echo "Please run as root"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
TMP=`mktemp`
|
||||||
|
if [ `which python2.7` ]
|
||||||
|
then
|
||||||
|
echo "#!/usr/bin/env python2.7" > $TMP
|
||||||
|
elif [ `which python2` ]
|
||||||
|
then
|
||||||
|
echo "#!/usr/bin/env python2" > $TMP
|
||||||
|
else
|
||||||
|
echo "#!/usr/bin/env python" > $TMP
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed 1d `dirname $0`/pirate-get.py >> $TMP
|
||||||
|
|
||||||
|
cp $TMP /usr/bin/pirate-get
|
||||||
|
chmod +x /usr/bin/pirate-get
|
||||||
|
chmod 755 /usr/bin/pirate-get
|
||||||
|
7
uninstall.sh
Executable file
7
uninstall.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/sh
|
||||||
|
if [ "$UID" -ne 0 ]
|
||||||
|
then echo "Please run as root"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm /usr/bin/pirate-get
|
Loading…
Reference in New Issue
Block a user