summaryrefslogtreecommitdiff
path: root/pbs-upload
blob: f682b8d17401d892b1ef294d76d08925e72e58c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash -euE

. $(librelib conf.sh)

cmd=${0##*/}
usage() {
	echo "Usage: $cmd [-h]"
	echo 'Commits to a package (run from the package directory).'
	echo ''
	echo 'Downloads or updates the PBS tree.'
	echo ''
	echo 'Options:'
	echo '  -h            Show this message'
}

main() {
	while getopts 'h' arg; do
		case $arg in
			h) usage; return 0;;
			*) usage >&2; return 1;;
		esac
	done
	if [[ $# -gt 0 ]]; then
		usage >&2
		return 1
	fi

	load_files abslibre
	check_vars abslibre WORKDIR

	cd "$WORKDIR/pbs"
	git push --all
}

main "$@"