Created
November 3, 2016 17:51
-
-
Save ruslo/817fb379cf150f9c7dbc6514b8ca00c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
set -x | |
BRANCHNAME="`git rev-parse --abbrev-ref HEAD`" | |
echo "Packing branch: '${BRANCHNAME}'" | |
rm -rf _packing ${BRANCHNAME}.tar ${BRANCHNAME}.7z | |
mkdir _packing | |
git archive ${BRANCHNAME} > ${BRANCHNAME}.tar | |
tar -x -f ${BRANCHNAME}.tar -C _packing | |
(cd _packing && 7z a -t7z -m0=lzma -mx=9 -mfb=128 -md=64m -ms=on ../${BRANCHNAME}.7z .) | |
ls -la ${BRANCHNAME}.7z |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Warning! Commit all the changes you need before running the script!
Rule of thumb: