APKBUILD examples:Git checkout

From Alpine Linux
Revision as of 17:28, 3 March 2013 by Fab (talk | contribs) (Created page with " <pre> source="http://dev.alpinelinux.org/archive/configshell/$_realname-$_ver.tar.gz" _giturl="https://github.com/agrover/configshell-fb" _gittag=v$_ver _builddir="$srcdir"...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
source="http://dev.alpinelinux.org/archive/configshell/$_realname-$_ver.tar.gz"

_giturl="https://github.com/agrover/configshell-fb"
_gittag=v$_ver

_builddir="$srcdir"/$_realname-fb-v$_ver

snapshot() {
	mkdir -p "$srcdir"
	cd "${SRCDEST:-$srcdir}"
	if ! [ -d $_realname-fb.git ]; then
		git clone --bare  $_giturl || return 1
		cd $_realname-fb.git
	else
		cd $_realname-fb.git
		git fetch || return 1
	fi
	
	git archive --prefix=$_realname/ -o "$SRCDEST"/$_realname-$_ver.tar.gz $_gittag
	scp "$SRCDEST"/$_realname-$_ver.tar.gz dev.alpinelinux.org:/archive/$_realname/
}