New Script: symlinker.sh
Former-commit-id: 41428828f6cf728cc75bbe449d04160c81dabff1
This commit is contained in:
parent
019f8e3064
commit
76097c01f4
46
symlinker.sh
Executable file
46
symlinker.sh
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function juliaLang(){
|
||||||
|
name="julia"
|
||||||
|
version="0.6.2"
|
||||||
|
linkDir="/usr/bin"
|
||||||
|
|
||||||
|
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 $(which julia)\n"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function idd(){
|
||||||
|
name="idd"
|
||||||
|
linkDir="/usr/bin"
|
||||||
|
|
||||||
|
if [ ! -f "${linkDir}/${name}" ];then
|
||||||
|
printf "\nLinking ${pwd}/${name} to ${linkDir}\n"
|
||||||
|
ln -s ${pwd}/idd.sh ${linkDir}/${name}
|
||||||
|
else
|
||||||
|
printf "${name} already exists in $(which idd)\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case "${1}" in
|
||||||
|
|
||||||
|
julia )
|
||||||
|
juliaLang
|
||||||
|
;;
|
||||||
|
|
||||||
|
idd )
|
||||||
|
idd
|
||||||
|
;;
|
||||||
|
|
||||||
|
* ) printf "\n${0} <command>\n"
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
Loading…
x
Reference in New Issue
Block a user