2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

gen-offsets.sh: error out if something goes wrong

In addition, add target rm if script has failed.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
Kir Kolyshkin
2012-02-22 02:09:17 +04:00
committed by Cyrill Gorcunov
parent 944ebac41d
commit ce7780179b
2 changed files with 5 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ $(HEAD-BIN): $(HEAD-LDS) $(OBJS-BLOB) parasite-util-net.o
$(HEAD-BLOB-GEN): $(HEAD-BIN) $(GEN-OFFSETS)
$(E) " GEN " $@
$(Q) $(SH) $(GEN-OFFSETS) parasite > $@
$(Q) $(SH) $(GEN-OFFSETS) parasite > $@ || rm -f $@
$(Q) sync
$(ROBJS): $(RSRCS-BLOB)
@@ -104,7 +104,7 @@ $(RHEAD-BIN): $(ROBJS) $(RHEAD-LDS)
$(RHEAD-BLOB-GEN): $(RHEAD-BIN) $(GEN-OFFSETS)
$(E) " GEN " $@
$(Q) $(SH) $(GEN-OFFSETS) restorer > $@
$(Q) $(SH) $(GEN-OFFSETS) restorer > $@ || rm -f $@
$(Q) sync
%.o: %.c

View File

@@ -1,5 +1,8 @@
#!/bin/sh
set -e
set -u
NAME=$1
INC_GUARD=__${NAME}_h__
PREFIX=${NAME}_blob_offset__