installer script xd
This commit is contained in:
parent
f4d083bc3e
commit
3c9df6d9c4
26
new
Executable file
26
new
Executable file
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user