create link on ~/WORK if it is not a file

This commit is contained in:
Jakobus Schürz 2020-01-21 15:17:29 +01:00
parent a1f2238de6
commit a63dca8ff8

View file

@ -285,7 +285,7 @@ if [[ $- = *i* ]] ; then
WDOTD=$(date "+${HOME}/archive/work/%Y/%m/work_%Y%m%d")
[ -e $WDOTD ] || mkdir -p "${WDOTD}"
[ -h "${HOME}/WORK" ] && ln -sf "${WDOTD}" "${HOME}/WORK"
[ -f "${HOME}/WORK" ] || ln -sf "${WDOTD}" "${HOME}/WORK"