Blame create-mcomix3-git-bare-tarball.sh

b25042f
#!/bin/bash
b25042f
b25042f
set -x
b25042f
set -e
b25042f
b25042f
REPONAME=mcomix3
b25042f
GITURL=https://github.com/multiSnow/${REPONAME}.git
b25042f
b25042f
DATE=$(date '+%Y%m%d')
b25042f
TIME=$(date '+%H%M')
b25042f
b25042f
TARNAME=${REPONAME}-${DATE}T${TIME}.tar.bz2
b25042f
b25042f
PWDDIR=$(pwd)
b25042f
TMPDIR=$(mktemp -d /var/tmp/${REPONAME}-XXXXXX)
b25042f
pushd $TMPDIR
b25042f
b25042f
git clone --mirror $GITURL
b25042f
b25042f
mkdir TMP
b25042f
pushd TMP
b25042f
git clone ../${REPONAME}.git
b25042f
cd ${REPONAME}
b25042f
git log 2>&1 | head -n 3
b25042f
echo
b25042f
popd
b25042f
b25042f
tar cjf ${TARNAME} ${REPONAME}.git/
b25042f
b25042f
cp -p ${TARNAME} $PWDDIR
b25042f
popd
b25042f
rm -rf $TMPDIR