symlinker.sh: change linkdir to /usr/bin
Former-commit-id: 0f85ff2d1107acfe934bf2228fbe018e2b39045a Former-commit-id: b009034da1e221757d83efd341b5aaaad8cdb10a
This commit is contained in:
parent
335430b358
commit
0c93046fc1
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
linkDir="/usr/local/bin"
|
||||
linkDir="/usr/bin"
|
||||
|
||||
|
||||
function juliaLang(){
|
||||
|
116
symlinker.sh~
116
symlinker.sh~
@ -1,116 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
linkDir="/usr/local/bin"
|
||||
|
||||
|
||||
function juliaLang(){
|
||||
name="julia"
|
||||
version="1.0.2"
|
||||
linkDir="${linkDir}"
|
||||
|
||||
if [ ! -f "${linkDir}/${name}" ];then
|
||||
printf "\nLinking $(pwd)/${name}-${version}/bin/${name} to ${linkDir}\n"
|
||||
ln -s $(pwd)/${name}-${version}/bin/${name} ${linkDir}/${name}
|
||||
else
|
||||
printf "\n${name} exists in ${linkDir}\n"
|
||||
fi
|
||||
}
|
||||
|
||||
function idd(){
|
||||
name="idd"
|
||||
linkDir="${linkDir}"
|
||||
|
||||
if [ ! -f "${linkDir}/${name}" ];then
|
||||
printf "\nLinking ${pwd}/${name} to ${linkDir}\n"
|
||||
ln -s $(pwd)/${name}.sh ${linkDir}/${name}
|
||||
else
|
||||
printf "${name} already exists in ${linkDir}\n"
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
function loadsshkeys(){
|
||||
name="loadsshkeys"
|
||||
linkDir="${linkDir}"
|
||||
|
||||
if [ ! -f "${linkDir}/${name}" ];then
|
||||
printf "\nLinking ${pwd}/${name} to ${linkDir}\n"
|
||||
ln -s $(pwd)/${name}.sh ${linkDir}/${name}
|
||||
else
|
||||
printf "${name} already exists in ${linkDir}\n"
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
function mic(){
|
||||
name="staticmic"
|
||||
linkDir="${linkDir}"
|
||||
|
||||
if [ ! -f "${linkDir}/${name}" ];then
|
||||
printf "\nLinking ${pwd}/${name} to ${linkDir}\n"
|
||||
ln -s $(pwd)/${name}.sh ${linkDir}/${name}
|
||||
else
|
||||
printf "${name} already exists in ${linkDir}\n"
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
function svc(){
|
||||
name="svc"
|
||||
linkDir="${linkDir}"
|
||||
|
||||
if [ ! -f "${linkDir}/${name}" ];then
|
||||
printf "\nLinking ${pwd}/${name} to ${linkDir}\n"
|
||||
ln -s $(pwd)/${name}.sh ${linkDir}/${name}
|
||||
else
|
||||
printf "${name} already exists in ${linkDir}\n"
|
||||
fi
|
||||
}
|
||||
|
||||
function trb(){
|
||||
name="trb"
|
||||
linkDir="${linkDir}"
|
||||
|
||||
if [ ! -f "${linkDir}/${name}" ];then
|
||||
printf "\nLinking ${pwd}/${name} to ${linkDir}\n"
|
||||
ln -s $(pwd)/${name}.sh ${linkDir}/${name}
|
||||
else
|
||||
printf "${name} already exists in ${linkDir}\n"
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
case "${1}" in
|
||||
|
||||
-r | --remove )
|
||||
rm -v ${linkDir}/${2};;
|
||||
julia )
|
||||
juliaLang;;
|
||||
|
||||
idd )
|
||||
idd;;
|
||||
|
||||
loadsshkeys)
|
||||
loadsshkeys
|
||||
|
||||
;;
|
||||
|
||||
svc )
|
||||
svc;;
|
||||
|
||||
mic )
|
||||
mic;;
|
||||
|
||||
trb)
|
||||
trb;;
|
||||
|
||||
test )
|
||||
echo ${linkDir};;
|
||||
* ) printf "\n${0} <command>\n"
|
||||
;;
|
||||
|
||||
esac
|
Loading…
x
Reference in New Issue
Block a user