1
0
mirror of https://github.com/limosek/zaf.git synced 2025-11-01 18:17:37 +01:00

Repaired 'which' detection and user environment checking

This commit is contained in:
Lukas Macura
2016-11-21 16:59:59 +01:00
parent f110e9aec7
commit f72488708b
5 changed files with 37 additions and 17 deletions

View File

@@ -21,7 +21,7 @@ fi
if ! zaf_fromcache "$key"; then
zaf_fromcache "$key" >/dev/null 2>/dev/null
[ $? -eq 3 ] && { zaf_err "Operation $key already in progress."; }
if which at >/dev/null 2>/dev/null; then
if zaf_which at >/dev/null 2>/dev/null; then
at -M now >/dev/null 2>/dev/null <<EOF
. $(dirname $0)/preload.sh; tmpf=\$(zaf_tmpfile cache); $@ 2>"\$tmpf" | zaf_tocache_stdin "$key" "$seconds" ; [ -s \$tmpf ] && zaf_wrn <\$tmpf
EOF