gcc_release (maybe_build_tarfile): Don't build a tarfile if the first directory doesn...
authorJakub Jelinek <jakub@redhat.com>
Thu, 21 Apr 2011 13:15:02 +0000 (15:15 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 21 Apr 2011 13:15:02 +0000 (15:15 +0200)
* gcc_release (maybe_build_tarfile): Don't build a tarfile if
the first directory doesn't exist.

From-SVN: r172827

maintainer-scripts/ChangeLog
maintainer-scripts/gcc_release

index d997e8d49b1761103f1436302aa46a46d53e85e8..dc399a73fba276fcb4797020a11d3840fad22817 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-21  Jakub Jelinek  <jakub@redhat.com>
+
+       * gcc_release (maybe_build_tarfile): Don't build a tarfile if
+       the first directory doesn't exist.
+
 2011-03-14  Jakub Jelinek  <jakub@redhat.com>
 
        * crontab: Enable 4.7 snapshots, switch 4.6 snapshots to
index 0c40313f8b6f97865e2e0d27c8edf60ca3e87cd4..233c15901988fa5bd8deff882f7615df7f809687 100755 (executable)
@@ -253,13 +253,7 @@ build_tarfile() {
 maybe_build_tarfile() {
   dest=$1
   shift
-  dir_exists=0
-  for maybe_dir in "$@"; do
-    if [ -d "$maybe_dir" ]; then
-      dir_exists=1
-    fi
-  done
-  if [ $dir_exists = 1 ]; then
+  if [ $# != 0 -a -d "$1" ]; then
     build_tarfile "$dest" "$@"
   else
     echo "Not building $dest tarfile"