Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Decompresses all compressed files in a Shapespark bundle
#!/bin/sh
if [ $# != 1 ]; then
echo "usage: $0 path-to-bundle-dir";
exit;
fi
bundle_dir=${1}
echo "Uncompressing files in ${bundle_dir}"
for file in `find ${bundle_dir} -type f`;
do
echo "Checking if ${file} is compressed"
gzip -l ${file} 2>/dev/null 1>/dev/null;
if [ $? -eq 0 ]; then
echo "Uncompressing ${file}"
mv ${file} ${file}.gz
gunzip ${file}.gz
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.