From edc4d4ed71128dbef6e47e26e27a06e3e127bdd8 Mon Sep 17 00:00:00 2001 From: Rnhmjoj Date: Wed, 3 Dec 2014 21:39:28 +0100 Subject: [PATCH] Simplify install/uninstall --- install | 3 +++ install.sh | 23 ----------------------- uninstall | 2 ++ uninstall.sh | 3 --- 4 files changed, 5 insertions(+), 26 deletions(-) create mode 100755 install delete mode 100755 install.sh create mode 100755 uninstall delete mode 100755 uninstall.sh diff --git a/install b/install new file mode 100755 index 0000000..2ad49be --- /dev/null +++ b/install @@ -0,0 +1,3 @@ +#!/bin/sh +cp $(dirname $0)/pirate-get.py /usr/local/bin/pirate-get +chmod +x /usr/local/bin/pirate-get diff --git a/install.sh b/install.sh deleted file mode 100755 index c60bdb3..0000000 --- a/install.sh +++ /dev/null @@ -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 diff --git a/uninstall b/uninstall new file mode 100755 index 0000000..87533e4 --- /dev/null +++ b/uninstall @@ -0,0 +1,2 @@ +#!/bin/sh +rm /usr/local/bin/pirate-get diff --git a/uninstall.sh b/uninstall.sh deleted file mode 100755 index c91f933..0000000 --- a/uninstall.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh -set -e -rm /usr/bin/pirate-get