From 4b8def7a2f4b4df399762540acf2428146331a91 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 12 Oct 2013 17:08:10 -0400 Subject: Move init() and fini() calls into commands. Now locking really isn't done for help and version commands. --- (limited to 'lib/cmd') diff --git a/lib/cmd/copy-suite.sh b/lib/cmd/copy-suite.sh index 5a5c7a1..304b3fd 100644 --- a/lib/cmd/copy-suite.sh +++ b/lib/cmd/copy-suite.sh @@ -28,6 +28,8 @@ cmd_copy_suite_main() local dst_chan= local dst_dist= + init + src_chan="${src_suite%/*}" src_dist="${src_suite##*/}" if [ "x${src_chan}" = "x${src_suite}" ]; then @@ -43,5 +45,7 @@ cmd_copy_suite_main() "${src_chan}" "${src_dist}" "${dst_chan}" "${dst_dist}" copy_suite "${src_chan}" "${src_dist}" "${dst_chan}" "${dst_dist}" + fini + return 0 } diff --git a/lib/cmd/include.sh b/lib/cmd/include.sh index c2b3712..79637af 100644 --- a/lib/cmd/include.sh +++ b/lib/cmd/include.sh @@ -23,9 +23,13 @@ cmd_include_main() { local changes= + init + for changes in "${@}"; do include_changes "${changes}" done + fini + return 0 } diff --git a/lib/cmd/process-incoming.sh b/lib/cmd/process-incoming.sh index 52f7480..c879852 100644 --- a/lib/cmd/process-incoming.sh +++ b/lib/cmd/process-incoming.sh @@ -26,6 +26,8 @@ cmd_process_incoming_main() local changes= local file= + init + info "$(get_msg 'cmd_process_incoming_processing')" for changes in "${conf_incoming_dir}/"*.changes; do @@ -40,4 +42,6 @@ cmd_process_incoming_main() done rm -f "${changes}" done + + fini } diff --git a/lib/cmd/remove-suite.sh b/lib/cmd/remove-suite.sh index 53baa3f..5fbc46c 100644 --- a/lib/cmd/remove-suite.sh +++ b/lib/cmd/remove-suite.sh @@ -25,6 +25,8 @@ cmd_remove_suite_main() local chan= local dist= + init + chan="${suite%/*}" dist="${suite##*/}" if [ "x${chan}" = "x${suite}" ]; then @@ -35,5 +37,7 @@ cmd_remove_suite_main() "${chan}" "${dist}" remove_suite "${chan}" "${dist}" + fini + return 0 } diff --git a/lib/cmd/remove.sh b/lib/cmd/remove.sh index 614fab4..a5dd1a0 100644 --- a/lib/cmd/remove.sh +++ b/lib/cmd/remove.sh @@ -28,6 +28,8 @@ cmd_remove_main() local chan= local dist= + init + chan="${suite%/*}" dist="${suite##*/}" if [ "x${chan}" = "x${suite}" ]; then @@ -37,5 +39,7 @@ cmd_remove_main() info "$(get_msg 'cmd_remove_removing')" "${source}" "${chan}" "${dist}" remove_source_from_suite "${chan}" "${dist}" "${source}" + fini + return 0 } -- cgit v0.9.1