Skip to content
This repository was archived by the owner on Feb 11, 2018. It is now read-only.

Commit

Permalink
Quote correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mbertheau committed May 21, 2015
1 parent 8dd8c63 commit 89493f7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions bin/check-exercises.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/usr/bin/env sh

for exercise in *; do
if [ -d $exercise ]; then
cd $exercise
if [ -f $exercise-test.rkt ]; then
echo Testing $exercise...
if [ -f $exercise.rkt ]; then
mv $exercise.rkt $exercise.rkt_
if [ -d "$exercise" ]; then
cd "$exercise" || exit
if [ -f "$exercise"-test.rkt ]; then
echo Testing "$exercise"...
if [ -f "$exercise".rkt ]; then
mv "$exercise".rkt "$exercise".rkt_
fi
mv example.rkt $exercise.rkt
racket $exercise-test.rkt
mv example.rkt "$exercise".rkt
racket "$exercise"-test.rkt
SUCCESS=$?
mv $exercise.rkt example.rkt
if [ -f $exercise.rkt_ ]; then
mv $exercise.rkt_ $exercise.rkt
mv "$exercise".rkt example.rkt
if [ -f "$exercise".rkt_ ]; then
mv "$exercise".rkt_ "$exercise".rkt
fi
if [ $SUCCESS -ne 0 ]; then
exit $SUCCESS
Expand Down

0 comments on commit 89493f7

Please sign in to comment.