about summary refs log tree commit diff
path: root/xbump
blob: df30d9f6dd94aefc2c28d7e66f643a0f75c91ab5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh -e
# xbump PKGNAME [git commit options] - git commit a version bump

cd $(xdistdir)

pkg=$1; shift
version=$(./xbps-src show "$pkg" | sed -n '/^version/s/[^:]*:[\t]*//p')

if [ -n "$(git ls-files srcpkgs/"$pkg"/template)" ]; then
	msg="$pkg: update to $version."
else
	msg="New package: $pkg-$version"
fi

dirs=$(./xbps-src show "$pkg" |
	sed -n '/^\(pkgname\|subpackage\)/s/[^:]*:[\t]*/srcpkgs\//p')

git add $dirs
git commit -m "$msg" "$@" $dirs