guix: Remove dest if OUTDIR mv fails

This commit is contained in:
Carl Dong 2021-05-25 16:25:30 -04:00
parent 8600934018
commit d7dec89091
2 changed files with 6 additions and 2 deletions

View file

@ -448,4 +448,6 @@ mkdir -p "$DISTSRC"
esac
) # $DISTSRC
mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR"
rm -rf "$ACTUAL_OUTDIR"
mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \
|| ( rm -rf "$ACTUAL_OUTDIR" && exit 1 )

View file

@ -100,4 +100,6 @@ mkdir -p "$DISTSRC"
esac
) # $DISTSRC
mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR"
rm -rf "$ACTUAL_OUTDIR"
mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \
|| ( rm -rf "$ACTUAL_OUTDIR" && exit 1 )