summaryrefslogtreecommitdiff
path: root/librecommit
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-06-20 23:09:02 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-06-20 23:09:02 -0300
commit59b03ff6bb15a5163604ad8ba344a8fd2f664826 (patch)
treeb780564f9857e372ba81091973d96b2ded99f14e /librecommit
parent7d2a691276f60e10c59204631f06fa9c5d6a1c25 (diff)
parent702cc20bd94cdb2939e0c163e8e9671c920c5b19 (diff)
Merge branch 'master' of ssh://vparabola/srv/git/projects/libretools
Conflicts: fullpkg
Diffstat (limited to 'librecommit')
-rwxr-xr-xlibrecommit34
1 files changed, 29 insertions, 5 deletions
diff --git a/librecommit b/librecommit
index bec5915..9444bd9 100755
--- a/librecommit
+++ b/librecommit
@@ -21,19 +21,43 @@
source /etc/libretools.conf
usage () {
- printf "$(gettext "cd to the dir with the PKGBUILD you are commiting and %s")" "$0"
+ echo "cd to the dir with the PKGBUILD you are commiting and"
+ echo
+ echo "$0 [optionally files to commit]"
+ echo
+ echo "This script commits the package using name, pkgver an pkgver"
echo
- printf "$(gettext "This script commits the package using name, pkgver an pkgver")"
}
+msg='Commiting libre package $pkg-$pkgver-$pkgrel'
+files=""
+
+for opt in $@ ; do
+ case ${opt} in
+ h) usage ;;
+ m) msg=${OPTARG} ;;
+ *) files+="${opt} " ;;
+ esac
+done
+
if [ ! -e PKGBUILD ]; then exit 1; fi
source PKGBUILD
-pkg=$pkgbase
+pkg=${pkgbase:-${pkgname}}
+
+if [ ${COMMITCD} = 'git' ]; then
+
+ ${COMMITCD} add $@ && ${COMMITCD} -m ""
+
+elif [ ${COMMITCD} = 'hg' ]; then
+
+ ${COMMITCMD} commit $@ -m -v || exit 1
+
+else
-if [ ${#pkg} -eq 0 ]; then pkg=$pkgname; fi
+ error "COMMITCD is not correctly set on libretools.conf"
-$COMMITCMD commit $@ -m "Commiting libre package $pkg-$pkgver-$pkgrel" -v || exit 1
+fi
exit 0