46 lines
790 B
Bash
46 lines
790 B
Bash
|
#!/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
|