From d853dee3ed47c30497e0c97d0c7962c4d196dde9 Mon Sep 17 00:00:00 2001 From: Travis Willard Date: Sat, 5 Jan 2008 09:54:58 -0500 Subject: Fix getopts bug and be more specific when moving package file. My recent commit adding the -c option and renaming the old -c to -r accidentally left out the new '-r' option from the getopts call. Additionally, add ${pkgrel} to the mv line after building to be more specific about that file to move. Signed-off-by: Travis Willard Signed-off-by: Aaron Griffin --- makechrootpkg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'makechrootpkg') diff --git a/makechrootpkg b/makechrootpkg index c7ce273..1e26042 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -44,7 +44,7 @@ usage () exit 1 } -while getopts ':c:h' arg; do +while getopts ':r:h:c' arg; do case "${arg}" in r) chrootdir="$OPTARG" ;; c) clean_first=1 ;; @@ -172,7 +172,7 @@ else source ${WORKDIR}/PKGBUILD if [ -z "$(mount | grep ${chrootdir}/union/pkgdest)" ]; then echo "Moving completed package file to ${WORKDIR}" - mv ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-*.pkg.tar.gz ${WORKDIR} + mv ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz ${WORKDIR} fi if [ -z "$(mount | grep ${chrootdir}/union/srcdest)" ]; then echo "Moving downloaded source files to ${WORKDIR}" -- cgit v1.2.3-70-g09d2