Skip to content

Commit

Permalink
Merge pull request tensorflow#482 from cshallue/unzip
Browse files Browse the repository at this point in the history
Use tar on OSX to unzip the MSCOCO data file.
  • Loading branch information
cshallue authored Sep 30, 2016
2 parents 7e9b983 + 608e790 commit 3bdc325
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion im2txt/im2txt/data/download_and_preprocess_mscoco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ if [ -z "$1" ]; then
exit
fi

if [ "$(uname)" == "Darwin" ]; then
UNZIP="tar -xf"
else
UNZIP="unzip -nq"
fi

# Create the output directories.
OUTPUT_DIR="${1%/}"
SCRATCH_DIR="${OUTPUT_DIR}/raw-data"
Expand All @@ -49,7 +55,7 @@ function download_and_unzip() {
echo "Skipping download of ${FILENAME}"
fi
echo "Unzipping ${FILENAME}"
unzip -nq ${FILENAME}
${UNZIP} ${FILENAME}
}

cd ${SCRATCH_DIR}
Expand Down

0 comments on commit 3bdc325

Please sign in to comment.