2013-12-14 14:43:10 +01:00
|
|
|
#!/usr/bin/env sh
|
2014-02-28 13:26:17 +01:00
|
|
|
set -e
|
2013-12-14 14:12:17 +01:00
|
|
|
|
2014-04-16 21:34:16 +02:00
|
|
|
TMP=$(mktemp pirate-get-XXXXXX)
|
2014-02-28 13:26:17 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
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
|
2013-12-14 14:12:17 +01:00
|
|
|
|
2014-01-31 23:15:47 +01:00
|
|
|
sed 1d $(dirname $0)/pirate-get.py >> "$TMP"
|
2013-12-14 14:12:17 +01:00
|
|
|
|
2014-02-28 13:26:17 +01:00
|
|
|
cp "$TMP" /usr/bin/pirate-get &&
|
|
|
|
chmod +x /usr/bin/pirate-get &&
|
|
|
|
chmod 755 /usr/bin/pirate-get &&
|
|
|
|
rm $TMP
|
|
|
|
} || rm $TMP
|