jitty-scripts/symlinker.sh
mollusk deb28f4e4a symlinker.sh: update julia to 1.0.3
Former-commit-id: dbfea7bf109c24b6ab9828f095791fd41366a65f
Former-commit-id: 24864b202e3bdc53f8beb87a0e205927881f6967
2018-12-25 18:18:54 -07:00

117 lines
2.1 KiB
Bash
Executable File

#!/bin/bash
linkDir="/usr/bin"
function juliaLang(){
name="julia"
version="1.0.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 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