jitty-scripts/symlinker.sh
mollusk 5e0e436e4e symlinker.sh: update julia dir to 0.6.3
Former-commit-id: 826644d8e188c6b120d1943d312a600cfd6281a2
2018-06-11 03:25:49 -07:00

64 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
linkDir="/usr/local/bin"
function juliaLang(){
name="julia"
version="0.6.3"
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 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
}
case "${1}" in
-r | --remove )
rm -v ${linkDir}/${2};;
julia )
juliaLang;;
idd )
idd;;
svc )
svc;;
test )
echo ${linkDir};;
* ) printf "\n${0} <command>\n"
;;
esac