Doh, check for links, not for files

This commit is contained in:
Brian Buller 2015-11-18 17:46:37 -06:00
parent c670dea630
commit 3649eb0311

View File

@ -2,14 +2,13 @@
exercism fetch exercism fetch
cd `exercism debug | grep "Exercises Directory" | cut -d: -f2` cd `exercism debug | grep "Exercises Directory" | cut -d: -f2`
for D in *; do for D in *; do
if [ -d "${D}" ] ; then if [ -d "${D}" ] ; then
cd ${D} cd ${D}
new=$(ls -tr|tail -n 1) new=$(ls -tr|tail -n 1)
if [ ${new} != "current" ] ; then if [ ${new} != "current" ] ; then
if [ -f current ] ; then if [ -L current ] ; then
rm current rm current
fi fi
ln -s ${new} current ln -s ${new} current