Install script problem "d1: Subscript out of range. "

Problem is, if a file named "lib" doesn't already exist in the directory where the library files are to be installed, the csh script tries to subscript an empty variable. The following hack fixes it:

--- installib.old Fri Feb 28 12:06:51 2003
+++ installib Wed Jul 23 12:41:21 2003
@@ -23,10 +23,13 @@
                         goto again2
                 endif
         endif
         set d1=(`ls -id lib`)
         set d2=(`ls -id $ldir`)
+ if ($#d1 < 1 ) then
+ set d1 = (-1)
+ endif
         if ($d1[1] != $d2[1]) then
                 echo -n "Install library files now [n]? "
                 if ( "$<" =~ [yY]* ) then
                         echo -n "Copying library files to $ldir... "
                         (cd lib ; tar -cf - *) | (cd $ldir ; tar -xf -)