Skip to content

Commit

Permalink
Fix: mk-job (linux) support versions without perl again
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastian-Kuhn committed Dec 10, 2024
1 parent 6bb5eeb commit 6c30174
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion agents/mk-job
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ cleanup() {
rm "${RUNNING_FILE}" 2>/dev/null
}

echo "start_time $(perl -e 'print time')" >"${TMP_FILE}" 2>/dev/null
try_perl() {
echo "start_time $(perl -e 'print time')" >"${TMP_FILE}" 2>/dev/null
}

fallback_date() {
date +"start_time %s" >"${TMP_FILE}" 2>/dev/null
}
try_perl || fallback_date

cp "${TMP_FILE}" "${RUNNING_FILE}" 2>/dev/null

if [ ! -w "${RUNNING_FILE}" ]; then
Expand Down

0 comments on commit 6c30174

Please sign in to comment.