Create directories when needed. Change loop to find all
authorChris Hanson <org/chris-hanson/cph>
Tue, 25 Jul 1989 19:26:33 +0000 (19:26 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 25 Jul 1989 19:26:33 +0000 (19:26 +0000)
subdirectories and convert all normal files within those
subdirectories (I hope this works on all unix variants).

etc/make_bin

index 1d74bb9bac14bd85aaebed50138358faa455df9f..276bda93fd33dfc06578f97be035f03d7d78b6cb 100755 (executable)
@@ -7,10 +7,16 @@ if (! -e $scheme/microcode/Psbtobin ) then
 endif
 
 cd $scheme/psb
-foreach i (*)
+foreach i (`find * -type d -print | xargs echo`)
+  if (! -d $scheme/$i) then
+    echo "mkdir $scheme/$i"
+    mkdir $scheme/$i
+  endif
   cd $scheme/psb/$i
   foreach j (*)
-    echo "Psbtobin $scheme/$i/$j"
-    $scheme/microcode/Psbtobin < $j >! $scheme/$i/$j
+    if (-f $j) then
+      echo "Psbtobin $scheme/$i/$j"
+      $scheme/microcode/Psbtobin < $j >! $scheme/$i/$j
+    endif
   end
 end