gmic/new-snapshot.sh

33 lines
596 B
Bash
Raw Normal View History

#!/bin/sh
function archive_it() {
name=$1
uri=$2
path=$3
if test -d $name
then
cd $name
git checkout master
git reset --hard
git pull
cd ..
else
git clone $uri
fi
DATE=`date +"%Y%m%d"`
cd $name
HASH=`git rev-parse --short HEAD`
FILE=${name}-${DATE}git${HASH}.tar.gz
git archive --format tar.gz --prefix ${name}/ -o ../$FILE HEAD $path
cd ..
}
archive_it zart https://github.com/c-koi/zart .
archive_it gmic-qt https://github.com/c-koi/gmic-qt .
archive_it gmic-community https://github.com/dtschump/gmic-community libcgmic