Last active
August 26, 2016 20:21
-
-
Save hex128/71d9cd70b8419eaa18db2aefc662f0f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTION=${1} | |
PATH=${2} | |
NAME=${3} | |
SHORT="$(echo ${NAME} | /bin/cut -d '_' -f 1,2)" | |
if [ "${SHORT}" != "${NAME}" ]; then | |
if [ "${ACTION}" == "add" ]; then | |
/bin/ln -Ts "${PATH}/${NAME}" "${PATH}/${SHORT}" | |
fi | |
if [ "${ACTION}" == "remove" ]; then | |
/bin/rm "${PATH}/${SHORT}" | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment