jitty-scripts/symlinker.sh
mollusk 76097c01f4 New Script: symlinker.sh
Former-commit-id: 41428828f6cf728cc75bbe449d04160c81dabff1
2018-02-17 20:25:18 -07:00

46 lines
790 B
Bash
Executable File

#!/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