From 81e21afee0518a7e511dd3af1ba275ad3c3fdddd Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Thu, 18 May 2006 22:58:20 +0000 Subject: [PATCH] - fix empty repository check; bash lazily evaluates wildcards, can't use empty string test to test if expansion is empty --- plc.d/packages | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plc.d/packages b/plc.d/packages index cc7a847..6c6862c 100755 --- a/plc.d/packages +++ b/plc.d/packages @@ -7,7 +7,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: gpg,v 1.3 2006/05/08 18:16:33 mlhuang Exp $ +# $Id: packages,v 1.1 2006/05/18 17:36:39 mlhuang Exp $ # # Source function library and configuration @@ -24,8 +24,11 @@ case "$1" in # Sign all RPMS. setsid detaches rpm from the terminal, # allowing the (hopefully blank) GPG password to be # entered from stdin instead of /dev/tty. - packages=$repository/*.rpm - if [ -n $packages ] ; then + packages= + for package in $repository/*.rpm ; do + packages="$packages $package" + done + if [ -n "$packages" ] ; then echo | setsid rpm \ --define "_signature gpg" \ --define "_gpg_path /etc/planetlab" \ -- 2.43.0