index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2020-01-30 11:04:19 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-01-30 11:04:19 +0100 |
commit | 90750bad1b9337731f7ba45b7d4a15544b0e51f6 (patch) | |
tree | ac130c36464a0fc7ee1b0232050ea18ccb6a3b6f | |
parent | 15bcbb428a3c1b87511c244d32ab628e52e9cd54 (diff) |
-rwxr-xr-x | lib/intentions-queue | 19 |
diff --git a/lib/intentions-queue b/lib/intentions-queue index e6c2e25..789d2d5 100755 --- a/lib/intentions-queue +++ b/lib/intentions-queue @@ -81,3 +81,22 @@ execute_intention() { ) || return 0 "${intentions_directory}/intention.${next_number}" } + +# intentions_left +# check if there are undone intentions left +# return 0 if there is something left to do +# return 1 if nothing is queued +intentions_left() { + find "${intentions_directory}" \ + -maxdepth 1 \ + -type f \ + -name 'intention.*' \ + -printf '%f\n' \ + | sed ' + s/^intention\.// + t + d + ' \ + | sort -n \ + | grep -qxm1 '[0-9]\+' +} |