Add shell script that gets the job done.

This commit is contained in:
Brian Buller 2015-11-18 17:13:37 -06:00
parent 82a9d870db
commit c670dea630
1 changed files with 19 additions and 0 deletions

19
update_exercism.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
exercism fetch
cd `exercism debug | grep "Exercises Directory" | cut -d: -f2`
for D in *; do
if [ -d "${D}" ] ; then
cd ${D}
new=$(ls -tr|tail -n 1)
if [ ${new} != "current" ] ; then
if [ -f current ] ; then
rm current
fi
ln -s ${new} current
fi
cd ..
fi
done