aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/portbuild
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-xTools/portbuild/scripts/setupnode7
1 files changed, 6 insertions, 1 deletions
diff --git a/Tools/portbuild/scripts/setupnode b/Tools/portbuild/scripts/setupnode
index d41a8422bcfd..ff876b6f2f80 100755
--- a/Tools/portbuild/scripts/setupnode
+++ b/Tools/portbuild/scripts/setupnode
@@ -6,7 +6,12 @@ fi
if [ $(echo $(/sbin/mount | grep "$2/.*(read-only)" | awk '{print $3}' | wc -c)) != 0 ]; then
/sbin/umount -f $(/sbin/mount | grep "$2/.*(read-only)" | awk '{print $3}')
fi
-rm -rf $2/*/chroot/*
+
+if ! rm -rf $2/*/chroot/* >/dev/null 2>&1; then
+ chflags -R noschg $2/*/chroot/*
+ rm -rf $2/*/chroot/*
+fi
+
scp -p -a $1:$2/scripts/portbuild $2/scripts
md5=$(/sbin/md5 $2/$3/tarballs/bindist.tar | awk '{print $4}')
if [ "$md5" = "$4" ]; then