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

View File

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