1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-07-22 10:47:45 +02:00

Cleaning tangle

This commit is contained in:
Anthony Scemama 2021-10-14 21:39:08 +02:00
parent 4a3a169e03
commit 08f13d29b4
3 changed files with 11 additions and 3 deletions

View File

@ -36,10 +36,17 @@ do
exported=${i%.org}.exported exported=${i%.org}.exported
exported=$(dirname $exported)/.$(basename $exported) exported=$(dirname $exported)/.$(basename $exported)
NOW=$(date +"%m%d%H%M.%S") NOW=$(date +"%m%d%H%M.%S")
extract_doc ${i} > $exported extract_doc ${i} &> $exported
rc=$?
# Make log file older than the exported files # Make log file older than the exported files
touch -t ${NOW} $exported touch -t ${NOW} $exported
# Fail if tangling failed
if [[ $rc -ne 0 ]] ; then
cat $exported
exit rc
fi
done done

View File

@ -37,10 +37,11 @@ do
NOW=$(date +"%m%d%H%M.%S") NOW=$(date +"%m%d%H%M.%S")
tangle ${i} &> $tangled tangle ${i} &> $tangled
rc=$? rc=$?
# Make log file older than the tangled files
touch -t ${NOW} $tangled
# Fail if tangling failed
if [[ $rc -ne 0 ]] ; then if [[ $rc -ne 0 ]] ; then
cat $tangled cat $tangled
exit rc exit rc
fi fi
# Make log file older than the tangled files
touch -t ${NOW} $tangled
done done