Skip to content

Instantly share code, notes, and snippets.

@shello
Created August 30, 2010 15:48
Show Gist options
  • Save shello/557583 to your computer and use it in GitHub Desktop.
Save shello/557583 to your computer and use it in GitHub Desktop.
function ziptotgz(){
TMPDIR=`mktemp -dt ziptotgz` || exit 1
unzip -qd $TMPDIR $1
pushd $TMPDIR > /dev/null
tar -czf ${1/%.zip/.tar.gz} ./*
popd > /dev/null
rm -rf $TMPDIR
unset TMPDIR
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment