Skip to content

Commit efda076

Browse files
committed
make mtime-travel optional
1 parent 6bf32f8 commit efda076

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

ci-build.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,17 @@ fi
8282

8383

8484
# restore source file mtimes based on content hashes
85-
for DIR in src lib
86-
do
87-
if [ -e mtimes-${DIR}.json ]
88-
then
89-
mtime-travel restore -f mtimes-src.json ${SRC_DIR}/${DIR}
90-
fi
91-
rm -f mtimes-${DIR}.json
92-
mtime-travel save -f mtimes-${DIR}.json ${SRC_DIR}/${DIR}
93-
done
85+
if which mtime-travel >/dev/null 2>&1; then
86+
for DIR in src lib
87+
do
88+
if [ -e mtimes-${DIR}.json ]
89+
then
90+
mtime-travel restore -f mtimes-${DIR}.json ${SRC_DIR}/${DIR}
91+
fi
92+
rm -f mtimes-${DIR}.json
93+
mtime-travel save -f mtimes-${DIR}.json ${SRC_DIR}/${DIR}
94+
done
95+
fi
9496

9597
# Try to ensure we're using the real g++ and clang++ versions we want
9698
mkdir -p bin

0 commit comments

Comments
 (0)