This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
anki/anki-make-git-snapshot.sh
chkr e0c09e2b55 - Update to git snapshot
- Includes fix for BZ 546331
2010-01-21 00:04:35 +00:00

49 lines
824 B
Bash

#!/bin/sh
# Usage: sh anki-make-git-snapshot.sh [LIBANKICOMMIT] [ANKIQTCOMMIT] [DATE]
#
# to make a snapshot of the given tag/branch. Defaults to HEAD.
set +x
if [ -z $3 ]; then
DATE=`date +%Y%m%d`
else
DATE=$3
fi
DIRNAME="anki-$DATE"
echo DIRNAME $DIRNAME
echo LIBANKIHEAD ${1:-HEAD}
echo ANKIQTHEAD ${2:-HEAD}
rm -rf $DIRNAME
git clone git://github.com/dae/ankiqt.git $DIRNAME
git clone git://github.com/dae/libanki.git $DIRNAME/libanki
pushd $DIRNAME
git checkout $ANKIQTHEAD
pushd libanki
git checkout $LIBANKIHEAD
popd
popd
ln -s $DIRNAME ankiqt
ln -s $DIRNAME/libanki libanki
bzr clone lp:anki
pushd anki
./update-mos.sh
popd
rm ankiqt
rm libanki
rm -rf anki
rm -rf $DIRNAME/.git $DIRNAME/libanki/.git
rm -rf $DIRNAME/libanki/tests/importing/supermemo*
tar czf $DIRNAME.tgz $DIRNAME
rm -rf $DIRNAME