summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-06-18 06:59:24 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-06-18 06:59:24 -0500
commit1c7f5b8c2807f08df766d6845e8565a13c46b333 (patch)
tree49ff0bddf3efbd442b11ea6f2ca0372b9e13d224
parent4a3896facc8ca6c4da82b9f3b6cad5b2558fe25c (diff)
* updated *commit
-rwxr-xr-xabslibre-commit3
-rwxr-xr-xlibrecommit34
2 files changed, 31 insertions, 6 deletions
diff --git a/abslibre-commit b/abslibre-commit
index 8922cc0..e906fbd 100755
--- a/abslibre-commit
+++ b/abslibre-commit
@@ -27,7 +27,8 @@ for _pkg in ${@}; do
unset pkgbase pkgname
source ${_pkg}/PKGBUILD
- git stage ${_pkg}/*
+# use . instead of * will use .gitignore
+ git stage ${_pkg}/.
git commit -m "${pkgbase:-$pkgname}-${pkgver}-${pkgrel}"
done
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