summary refs log tree commit diff
path: root/xbump
diff options
context:
space:
mode:
Diffstat (limited to 'xbump')
-rwxr-xr-xxbump13
1 files changed, 7 insertions, 6 deletions
diff --git a/xbump b/xbump
index 8276fb2..df96c31 100755
--- a/xbump
+++ b/xbump
@@ -12,12 +12,6 @@ if [ -z "$version" ]; then
 	exit 1
 fi
 
-if [ -n "$(git ls-files srcpkgs/"$pkg"/template)" ]; then
-	msg="$pkg: update to $version."
-else
-	msg="New package: $pkg-$version"
-fi
-
 spkpattern=$(xsubpkg "$pkg" | tr '\n' '|' | sed 's/\(.*\)|/^(\1)$/')
 shlibs=$(git diff common/shlibs | grep "^+[^+]" | \
 	sed "s/^+[^ ]\+ \(.*\)-[^-]\+_[0-9]\+$/\1/")
@@ -32,4 +26,11 @@ dirs=$(./xbps-src show "$pkg" |
 	sed -n '/^\(pkgname\|subpackage\)/s/[^:]*:[\t]*/srcpkgs\//p')
 
 git add $dirs
+
+if git diff --quiet --cached --diff-filter=A -- srcpkgs/"$pkg"/template; then
+	msg="$pkg: update to $version."
+else
+	msg="New package: $pkg-$version"
+fi
+
 git commit -m "$msg" "$@" $dirs