Commit f2a6b18f authored by Mikaël Salson's avatar Mikaël Salson
Browse files

tools/ Don't touch the git file.

Touching it updated its last modification date which triggered the recompilation of vidjil.cpp.
We don't touch it anymore. Therefore the file may not exist and the diff may fail. We just ignore
error messages. In such a case the mv will be executed and the file will then exist.

Fixes #3309
parent a39f9bbf
Pipeline #30049 passed with stages
in 53 seconds
......@@ -8,9 +8,7 @@ GITV_H=$1
touch ${GITV_H}
git log -1 --pretty=format:"${PRETTY_PREFIX} \"%h (%cd)\"" --date=short --abbrev-commit > ${GITV_H_TMP} 2> /dev/null
# Replace the file only when the new file is different
diff ${GITV_H} ${GITV_H_TMP} || mv ${GITV_H_TMP} ${GITV_H}
diff ${GITV_H} ${GITV_H_TMP} 2> /dev/null || mv ${GITV_H_TMP} ${GITV_H}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment