Commit ddfcdc0a authored by Richard Torenvliet's avatar Richard Torenvliet

Add .gz as an extension, and copy submit txt to the submitters dir

parent 66634ab0
...@@ -42,6 +42,7 @@ function extract() { ...@@ -42,6 +42,7 @@ function extract() {
case $ARCHIVE in case $ARCHIVE in
*.tar.bz2) tar xvjf $ARCHIVE -C $OUTPUT;; *.tar.bz2) tar xvjf $ARCHIVE -C $OUTPUT;;
*.tar.gz) tar xvzf $ARCHIVE -C $OUTPUT;; *.tar.gz) tar xvzf $ARCHIVE -C $OUTPUT;;
*.gz) tar xvzf $ARCHIVE -C $OUTPUT;;
*.rar) unrar x $ARCHIVE $OUTPUT ;; *.rar) unrar x $ARCHIVE $OUTPUT ;;
*.tar) tar xvf $ARCHIVE -C $OUTPUT;; *.tar) tar xvf $ARCHIVE -C $OUTPUT;;
*.tbz2) tar xvjf $ARCHIVE -C $OUTPUT;; *.tbz2) tar xvjf $ARCHIVE -C $OUTPUT;;
...@@ -73,6 +74,10 @@ function find_and_unpack() { ...@@ -73,6 +74,10 @@ function find_and_unpack() {
sed -e "s/\ /_/g;s/(//g;s/)//g;" | awk '{print tolower($0)}'` sed -e "s/\ /_/g;s/(//g;s/)//g;" | awk '{print tolower($0)}'`
mkdir -p $SUBMIT_NAME mkdir -p $SUBMIT_NAME
# cp txt to submitters DIR
cp $i $SUBMIT_NAME
FIND_PREFIX=`basename $PREFIX` FIND_PREFIX=`basename $PREFIX`
ARCHIVE_LIST=`find $INPUT_DIR -name "$FIND_PREFIX\_*.tar.gz" \ ARCHIVE_LIST=`find $INPUT_DIR -name "$FIND_PREFIX\_*.tar.gz" \
-o -name "$FIND_PREFIX\_*.tar"\ -o -name "$FIND_PREFIX\_*.tar"\
...@@ -110,7 +115,7 @@ function create_directory() { ...@@ -110,7 +115,7 @@ function create_directory() {
mkdir -p $1 mkdir -p $1
} }
#Help function # Help function
function HELP { function HELP {
echo -e \\n"Help documentation for ${SCRIPT}."\\n echo -e \\n"Help documentation for ${SCRIPT}."\\n
echo -e "Basic usage: $SCRIPT gradebook.zip"\\n echo -e "Basic usage: $SCRIPT gradebook.zip"\\n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment