summaryrefslogtreecommitdiff
path: root/pkg/git/fetch.sh
blob: 326e7338815389c97ceaf26ccc24cbbe633d2675 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
set -e

sh scripts/fetch-git.sh "$@"

cd "$1"
shift

if [ -e src/man ] ; then
	rm -rf src/man
fi

if ! sh "$OLDPWD/scripts/checksum.sh" -c sha256 2>/dev/null ; then
	curl -L -O -K url
	sh "$OLDPWD/scripts/checksum.sh" -c sha256
fi

read -r _ archive <sha256
sh "$OLDPWD/scripts/extract.sh" "$archive" -s ',^\.,src/man,'