cros_workon_make: fix --scrub to scrub directories also
I was noticing wierdness in my build and pinned it down to having a
directory linger around after --scrub.
BUG=none
TEST=see below
$ mkdir foo
$ touch foo/bar
$ ec -- cros_workon_make --scrub kernel
WARNING : --scrub will destroy ALL FILES unknown to git!
Are you sure you want to do this? [y|N]y
Removing foo/
Change-Id: I3491cf9ff82f2a321482a239d92cf97a505af0bb
Note: ec is my alias for enter_chroot.sh
Reviewed-on: http://gerrit.chromium.org/gerrit/724
Tested-by: Mandeep Singh Baines <[email protected]>
Reviewed-by: Chris Masone <[email protected]>
diff --git a/host/cros_workon_make b/host/cros_workon_make
index ed211ab..27198e8 100755
--- a/host/cros_workon_make
+++ b/host/cros_workon_make
@@ -63,7 +63,7 @@
srcdir=$(readlink -m ${CROS_WORKON_SRCDIR})
trunkdir=$(readlink -m ${CHROOT_TRUNK_DIR})
project_path=${srcdir#${trunkdir}/}
- if ! (cd "${GCLIENT_ROOT}/${project_path}" && git clean -xf); then
+ if ! (cd "${GCLIENT_ROOT}/${project_path}" && git clean -dxf); then
die "Could not scrub source directory"
fi
else