From 3c9df6d9c4f3ba62c8e88c6afa33ca2bb7a4d819 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Thu, 4 Jul 2019 14:07:25 -0700 Subject: [PATCH] installer script xd --- new | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 new diff --git a/new b/new new file mode 100755 index 0000000..0eeea95 --- /dev/null +++ b/new @@ -0,0 +1,26 @@ +#!/bin/sh + +# Installs a new script(s) into the configured location +dest='/usr/bin/' + +if [ "$1" = "" ] +then + exit 0 +fi + +if [ ! "`whoami`" = "root" ] +then + echo Please run this as root! + exit +fi + +for item in $@; do + name="`basename $item`" + if [ -f "/usr/bin/$name" ] + then + rm -f "/usr/bin/$name" + fi + echo 'ln -s ' "`pwd`/$item" "/usr/bin/$name" + ln -s "`pwd`/$item" "/usr/bin/$name" +done +