[clbuild-devel] [PATCH] fix trash to trash project's registered system
Daniel White
daniel at whitehouse.id.au
Mon Jan 12 14:42:05 UTC 2009
On Sat, 10 Jan 2009 16:03:26 -0500
Ben Hyde <bhyde at pobox.com> wrote:
> 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"
> }
This only removes .asd files that happen to contain the project's name.
I've the following patch in my repository at http://darcs.whitehouse.id.au/daniel/clbuild/
* Clean broken links after a trash operation
--
Daniel White
More information about the clbuild-devel
mailing list