# HG changeset patch # User John Floren # Date 1317081102 25200 # Node ID 1f565f3fedf3f9a02b6a8f7c968b2fc17cbede2d # Parent 11dfb85b9acf8ebd870a39d2370e1fa3fb0092a5 remove: If you don't get rid of the "root" component of your file listing, you won't actually remove anything. Also, I don't think it's productive to list the remove commands being issued, because the final "rm -f /sys" will scare people. It won't remove empty directories, but it doesn't say that. R=nix-dev, rminnich CC=nix-dev http://codereview.appspot.com/5137044 diff -r 11dfb85b9acf -r 1f565f3fedf3 rc/bin/pm/remove --- a/rc/bin/pm/remove Mon Sep 26 15:10:32 2011 -0700 +++ b/rc/bin/pm/remove Mon Sep 26 16:51:42 2011 -0700 @@ -51,17 +51,13 @@ rms=() files='' if(test -e root.tgz) - files=`{tar ztf root.tgz} + files=`{tar ztf root.tgz | sed 's/^root//g'} if not - files=`{cat root.lst} + files=`{cat root.lst | sed 's/^root//g'} for(f in $files){ rms=($f $rms) } for(f in $rms){ - if(~ $ROOT /) - echo rm -f $f - if not - echo rm -f $ROOT$f rm -f $ROOT$f } }