1
0
Fork 0
mirror of https://codeberg.org/spire/spcomp.git synced 2026-06-03 08:34:12 +02:00

overwrite the target without creating a new node

This commit is contained in:
Robin Appelman 2020-05-19 22:12:27 +02:00
commit 21e975fd84

View file

@ -32,12 +32,13 @@ OUT="${IN%.sp}.smx"
chown $(stat -c '%u' "$IN"):$(stat -c '%g' "$IN") "$OUT" chown $(stat -c '%u' "$IN"):$(stat -c '%g' "$IN") "$OUT"
if [ -d "/output" ]; then if [ -d "/output" ]; then
cp $OUT /output // copy without changing the file node
cat $OUT > /output/$OUT
fi fi
if [ ! -z "$OUTPUT" ] if [ ! -z "$OUTPUT" ]
then then
mv $OUT /tmp/out.smx mv $OUT /tmp/out.smx
cd "$BASEDIR" cd "$BASEDIR"
mv /tmp/out.smx $OUTPUT cat /tmp/out.smx > $OUTPUT
fi fi