comparison code/submission.sh @ 83:3e5de539a676

super submission script!
author William Morgan <billjunk@mrgn.org>
date Mon, 28 Jul 2014 04:39:30 -0700
parents c68c03a0e072
children
comparison
equal deleted inserted replaced
80:4438054a183c 83:3e5de539a676
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # To be run from the code subfolder. 3 # To be run from the code subfolder.
4 4
5 #Compiles the lambdaman.gcc program and places it in the solution folder 5 echo "Clean all outputs before we start..."
6 rm -rf ../solution
7 rm -rf ../../submission.tar.gz_CHECK
8 rm ../../submission.tar.gz
9
10 echo "Check that compiler binary files exist..."
11 ls ./lmc
12 ls ./gqc
13
14 echo "Compile the lambdaman.gcc program into solutions folder..."
6 mkdir -p ../solution 15 mkdir -p ../solution
7 ./lmc dotScanner.lm > ../solution/lambdaman.gcc 16 ./lmc dotScanner.lm > ../solution/lambdaman.gcc
8 17
9 #Prepares a tar file for submission. 18 echo "Compile two of our ghost programs into solutions folder..."
10 tar -cvzf ../../submission.tar.gz --exclude-vcs ../../icfp2014 19 ./gqc ghost0.gq > ../solution/ghost0.ghc
20 ./gqc ghost1.gq > ../solution/ghost1.ghc
11 21
12 #Prints the sha1 hash of the tar to standard out. 22 echo "Prepare a tar file for submission without binaries, hg, or *~ files..."
23 tar -czf ../../submission.tar.gz --exclude-vcs --exclude='gqc' --exclude='lmc' --exclude='gcc' --exclude='*~' ../
24
25 echo "Untar into folder for sanity checks..."
26 mkdir -p ../../submission.tar.gz_CHECK
27 tar -xzf ../../submission.tar.gz -C ../../submission.tar.gz_CHECK
28 ls -haRl ../../submission.tar.gz_CHECK
29 echo "Does the size look right?"
30 echo "All the files there?"
31
32 echo "Here is the hash:"
13 sha1sum ../../submission.tar.gz 33 sha1sum ../../submission.tar.gz
14 34
15