#! /bin/bash # finalize - a script to assemble the project and make sure it has no weird # problems # USAGE: Pass in all the files to be checked and archived echo "You should be running this from make. Are you?" echo "Checking all files for unresolved TODOs/FIXMEs..." if egrep -Hn "(TODO)|(FIXME)" $* then echo "ERROR: Unresolved fixmes!" exit 1 fi echo "No unresolved stuff found...good." echo "Creating release directory..." SUBDIR=proj3_release if [[ -e $SUBDIR ]] then echo "Looks like the directory already exists. You should probably remove it" exit 1 fi mkdir -p $SUBDIR echo "Copying files over..." cp $* $SUBDIR/ ARCHNAME=$SUBDIR.tar.bz2 echo "Archiving to $ARCHNAME" tar -cjf $ARCHNAME $SUBDIR echo "Deleting release directory..." rm -r $SUBDIR