#!/bin/bash #Simple script to submit CS248 assignment 1 #feel free to perform these same steps by hand #Author: Ethan Dreyfuss, September 2008 echo "" echo "***********AUTOSUBMITTER V1.0***********" echo "This script will copy your assignment1 code over to your AFS space and then" echo "run the /afs/ir/class/cs248/bin/submit script. When asked for the assignment" echo "path during submit use \".\". You will also be asked for your password 3 times." echo "" echo "*WARNING* it will delete the contents of the ~/CS248SUBMIT directory on your" echo "AFS space if that directory already exists. Press ctrl-c now if you do not" echo "want this to happen." echo "" echo "*NOTE* this script assumes that your code is in the " echo "~/Desktop/assignments/assignment2 folder. If this is not the case please copy" echo "your code there before running this script." pushd ~/Desktop/assignments > /dev/null echo -n "Enter SUNetID: " read sunetid echo "" echo "**Making CS248 directory in your AFS space**" ssh $sunetid@myth.stanford.edu 'mkdir CS248SUBMIT; rm -rf ./CS248SUBMIT/*' echo "" echo "**Copying assignment1 directory to AFS space**" echo "YOU SHOULD SEE FILES COPY, IF YOU DON'T SOMETHING IS WRONG" scp -r ./assignment2 $sunetid@myth.stanford.edu:~/CS248SUBMIT echo "" echo "**Running submit script**" echo "WHEN ASKED FOR YOUR DIRECTORY, TYPE '.'" ssh $sunetid@myth.stanford.edu 'cd ~/CS248SUBMIT; /afs/ir/class/cs248/bin/submit' popd > /dev/null