11 if [ -z ${WORK_DIR} ]; then
12 echo "nothing to clean up."
18 if [[ $# != 1 ]]; then
19 die "You must supply one argument: the full path of the tar.gz file to create."
22 echo "Output target: $OUTPUT_TARGET"
25 git status &>/dev/null || die "git status failed in the current directory."
26 git status | grep modified && die "git status showed some modified files."
29 WORK_DIR="$(mktemp -d)"
33 pushd "${WORK_DIR}" &> /dev/null
34 git clone --bare "${GIT_DIR}" ./out
35 cp -f "${GIT_DIR}/.git/config" "./out/config"
36 tar cvzf ./out.tar.gz ./out
37 cp -f ./out.tar.gz "${OUTPUT_TARGET}"