summaryrefslogtreecommitdiff
path: root/tcwg-cleanup-stale-workspaces.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-04-29 05:47:35 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-05-02 15:59:25 +0000
commit80881f7d36dc0507622b51116a3e808f7aef256a (patch)
treeba8862a2bad1d7f63ea040cc5e1959ae4ebb39f7 /tcwg-cleanup-stale-workspaces.sh
parentd980e142525bcd3dc1b19b4cd7421d6c3321e096 (diff)
tcwg-cleanup-stale-workspaces.sh: Robustify against non-exec directories
... which glibc testsuite can create. Change-Id: I14c5fea97eb9a11572fd6c31b8a3b328757fec4b
Diffstat (limited to 'tcwg-cleanup-stale-workspaces.sh')
-rwxr-xr-xtcwg-cleanup-stale-workspaces.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tcwg-cleanup-stale-workspaces.sh b/tcwg-cleanup-stale-workspaces.sh
index f30c0908..af1c21bf 100755
--- a/tcwg-cleanup-stale-workspaces.sh
+++ b/tcwg-cleanup-stale-workspaces.sh
@@ -51,6 +51,10 @@ if [ ${#rm_dirs[@]} != 0 ]; then
ls -ld "${rm_dirs[@]}"
du -hs "${rm_dirs[@]}"
if ! $dry_run; then
+ # Make sure we can get into all subdirectories.
+ # Glibc tests can leave behind "rw-" directories, the contents of which
+ # can't be cleaned up without "x" permission bit.
+ chmod -R +rwx "${rm_dirs[@]}"
rm -rf "${rm_dirs[@]}"
else
echo "DRY_RUN: NOT REMOVING DIRECTORIES"