From 1b59d6008a5a47969f3395ac7d68e1c0c22dcf43 Mon Sep 17 00:00:00 2001 From: Joshua Ismael Haase Hernández Date: Mon, 16 May 2011 10:22:09 -0500 Subject: librestage to use arch from pkgbuild librerelease to print nice format --- librerelease | 2 +- librestage | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/librerelease b/librerelease index 2359de8..1e323c3 100755 --- a/librerelease +++ b/librerelease @@ -37,7 +37,7 @@ function usage { } function list_packages { - find $WORKDIR/staging/ -type f -print0 + find $WORKDIR/staging/ -type f -printf "%f\n" } function clean_non_packages { diff --git a/librestage b/librestage index fa72098..498801b 100755 --- a/librestage +++ b/librestage @@ -44,6 +44,12 @@ EOU repos=$@ +while getopts 'h' arg; do + case $arg in + h) usage; exit 0 ;; + esac +done + if [ ${#repos} -eq 0 ]; then usage exit 1; @@ -55,10 +61,10 @@ fi } # Source the needed files -source ./PKGBUILD -[[ -e ./rePKGBUILD ]] && source ./rePKGBUILD source /etc/makepkg.conf [[ -e ~/.makepkg.conf ]] && source ~/.makepkg.conf +source ./PKGBUILD +[[ -e ./rePKGBUILD ]] && source ./rePKGBUILD # Default package location PKGDEST=${PKGDEST:-.} @@ -67,7 +73,7 @@ SRCPKGDEST=${SRCPKGDEST:-.} PKGEXT=".pkg.tar.?z" # Copies the packages to the specified repos inside staging -for _arch in ${ARCHES[@]}; do +for _arch in ${arch[@]}; do for pkg in ${pkgname[@]}; do pkgpath=$(find ${PKGDEST}/ -type f -name "${pkg}-${pkgver}-${pkgrel}-${_arch}${PKGEXT}") -- cgit v1.2.3-54-g00ecf