From 83c8289c8fe1dfa6f3a060f050c3472f5ed39bd0 Mon Sep 17 00:00:00 2001 From: Sam Gaus Date: Fri, 31 Jan 2014 22:15:47 +0000 Subject: [PATCH] Removed temporary files --- .gitignore | 1 + install.sh | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba31760 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +pirate-get-* diff --git a/install.sh b/install.sh index e8becba..ed31e16 100755 --- a/install.sh +++ b/install.sh @@ -1,22 +1,24 @@ #!/usr/bin/env sh + if [ "$UID" -ne 0 ] then echo "Please run as root" exit fi -TMP=`mktemp pirate-get-XXX` -if [ `which python2.7` ] +TMP=$(mktemp pirate-get-XXX) +if [ $(which python2.7) ] then - echo "#!/usr/bin/env python2.7" > $TMP + echo "#!/usr/bin/env python2.7" > "$TMP" elif [ `which python2` ] then - echo "#!/usr/bin/env python2" > $TMP + echo "#!/usr/bin/env python2" > "$TMP" else - echo "#!/usr/bin/env python" > $TMP + echo "#!/usr/bin/env python" > "$TMP" fi -sed 1d `dirname $0`/pirate-get.py >> $TMP +sed 1d $(dirname $0)/pirate-get.py >> "$TMP" -cp $TMP /usr/bin/pirate-get +cp "$TMP" /usr/bin/pirate-get chmod +x /usr/bin/pirate-get chmod 755 /usr/bin/pirate-get +rm "$TMP"