[clbuild-devel] [PATCH] fix trash to trash project's registered system

Ben Hyde bhyde at pobox.com
Sat Jan 10 21:03:26 UTC 2009


The following diff changes the trash command.  It currently neglects to
de-register the project's system files.  This removes those symbolic
links.

An addition minor change to the working of the count_systems scratches
my itch.  I install project foo, and it says "60 system definition  
files registered"
making me think project foo had 60 systems.


--- old-clbuild/clbuild	2009-01-10 15:58:17.000000000 -0500
+++ new-clbuild/clbuild	2009-01-10 15:58:17.000000000 -0500
@@ -449,7 +449,7 @@

  count_systems() {
  	n_asd=`ls -1 "$system_dir"/*.asd | wc -l`
-	echo "$n_asd system definition files registered"
+	echo "$n_asd total system definition files now registered"
  }

   
blank_line 
="                                                                  "
@@ -1404,6 +1404,8 @@
      else
  	mkdir $trash
      fi
+    echo "deregistering system files of $1"
+    ls -l $BASE/systems/* | grep "$1" | awk '{print $9}' | xargs rm
      echo moving "$1" to "$trash/$basename"
      mv "$1" "$trash"
  }





More information about the clbuild-devel mailing list