Skip to content

Commit

Permalink
getsafe: Better explain why the build is stopped
Browse files Browse the repository at this point in the history
Improve user experience.

Thanks to Jesse Rehmer for the suggestion.
  • Loading branch information
Julien-Elie committed Sep 17, 2023
1 parent c1e7189 commit 97bff2d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions site/getsafe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,21 @@ if [ -f SCCS/s.${DEST} ]; then
exec sccs get -s ${DEST}
fi

## File exist locally?
## Does the file exist locally?
if [ -f ${DEST} ]; then
cmp ${SRC} ${DEST}
if [ $? -eq 0 ]; then
touch ${DEST}
exit 0
fi
echo "${SRC} has changed; please update ${DEST}"
diff -u ${SRC} ${DEST}
echo "${SRC} has changed since the last build."
echo "Please ensure the above changes wouldn't be worth adding"
echo "to your ${DEST} production file."
echo " Once taken into account or if you don't mind the proposed changes,"
echo " run \"rm site/${DEST}\" and continue the build."
echo " Note that you can silent all these warnings by running"
echo ' "cd site && make distclean".'
exit 1
fi

Expand Down

0 comments on commit 97bff2d

Please sign in to comment.