diff options
author | Erich Eckner <git@eckner.net> | 2020-01-30 13:59:57 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-01-30 13:59:57 +0100 |
commit | a805783d94e20f492fa8b8a4281017f5a1b87576 (patch) | |
tree | 703582de8ec9a7b7990170ac9f46affe54e5c90d /lib | |
parent | 05af0d60852170d167c9c1c85f02de9e88dd280b (diff) | |
download | builder-a805783d94e20f492fa8b8a4281017f5a1b87576.tar.xz |
lib/intentions-queue: intent_something(): add dummy-mode `-n`
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/intentions-queue | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/intentions-queue b/lib/intentions-queue index 9f89b82..e9b79de 100755 --- a/lib/intentions-queue +++ b/lib/intentions-queue @@ -9,12 +9,16 @@ if [ -z "${base_dir}" ]; then . '../lib/load-configuration' fi -# intent_something -# create an intention, provided on stdin +# intent_something [-n] +# create an intention, provided on stdin - or just show the intention (-n) # note, that this function is not thread-safe - use the lock # $package_database_lock_file externally intent_something() { local next_number + if [ "x$1" = 'x-n' ]; then + cat + return + fi next_number=$(( $( find "${intentions_directory}" \ |