summaryrefslogtreecommitdiffstats
path: root/jenkins-server-slave-setup/scripts/backup_clean-workspace.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jenkins-server-slave-setup/scripts/backup_clean-workspace.sh')
-rwxr-xr-xjenkins-server-slave-setup/scripts/backup_clean-workspace.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/jenkins-server-slave-setup/scripts/backup_clean-workspace.sh b/jenkins-server-slave-setup/scripts/backup_clean-workspace.sh
new file mode 100755
index 0000000..67b4e76
--- /dev/null
+++ b/jenkins-server-slave-setup/scripts/backup_clean-workspace.sh
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+bdir=$1
+shift
+
+echo TOTAL $bdir
+du -hsc $bdir
+
+echo
+echo Cleaning workspace $bdir
+rm -rf `find $bdir -name workspace`
+rm -rf `find $bdir -name workspace-files`
+rm -rf `find $bdir -name javadoc`
+
+echo
+echo Cleaned TOTAL $bdir
+du -hsc $bdir
+