mirror of
https://github.com/vikstrous/pirate-get
synced 2025-01-09 09:59:51 +01:00
Simplify install/uninstall
This commit is contained in:
parent
eadac1beef
commit
edc4d4ed71
3
install
Executable file
3
install
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cp $(dirname $0)/pirate-get.py /usr/local/bin/pirate-get
|
||||
chmod +x /usr/local/bin/pirate-get
|
23
install.sh
23
install.sh
@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
TMP=$(mktemp pirate-get-XXXXXX)
|
||||
|
||||
{
|
||||
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 &&
|
||||
rm $TMP
|
||||
} || rm $TMP
|
@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
rm /usr/bin/pirate-get
|
Loading…
Reference in New Issue
Block a user