Skip to content

Commit

Permalink
build as user fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lnussel committed Jan 24, 2022
1 parent 953915d commit aa2b437
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build-vm
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,10 @@ vm_setup() {
if test -n "$VM_USE_MKFS_COPYIN" ; then
echo "Using mkfs copyin mode to populate the root filesystem"
mkdir_build_root
rm -rf "$BUILD_ROOT"/* "$BUILD_ROOT"/.[^.]*
if test ! -w /root ; then
find "$BUILD_ROOT" -type d -not -perm /200 -print0 | xargs -0 --no-run-if-empty chmod +w
fi
find "$BUILD_ROOT" -mindepth 1 -maxdepth 1 -print0 | xargs -0 --no-run-if-empty rm -rf
if test -z "$CLEAN_BUILD" -a -e "$VM_ROOT" ; then
echo "Recovering former build root"
debugfs -f <(echo rdump / "$BUILD_ROOT") "$VM_ROOT"
Expand Down

0 comments on commit aa2b437

Please sign in to comment.