diff options
author | P. J. McDermott <pjm@nac.net> | 2013-10-12 17:08:10 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-10-12 17:08:10 (EDT) |
commit | 4b8def7a2f4b4df399762540acf2428146331a91 (patch) | |
tree | dd2ed06b35692a09605028fef82b677c769346a8 | |
parent | 22b003b01a7ed817464b2fc0b776f2c3fb0cb65c (diff) |
Move init() and fini() calls into commands.
Now locking really isn't done for help and version commands.
-rw-r--r-- | lib/cmd/copy-suite.sh | 4 | ||||
-rw-r--r-- | lib/cmd/include.sh | 4 | ||||
-rw-r--r-- | lib/cmd/process-incoming.sh | 4 | ||||
-rw-r--r-- | lib/cmd/remove-suite.sh | 4 | ||||
-rw-r--r-- | lib/cmd/remove.sh | 4 | ||||
-rw-r--r-- | src/pro-archman.sh | 2 |
6 files changed, 20 insertions, 2 deletions
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 } diff --git a/src/pro-archman.sh b/src/pro-archman.sh index b2894ae..11ec0d8 100644 --- a/src/pro-archman.sh +++ b/src/pro-archman.sh @@ -104,10 +104,8 @@ main() run_cmd "${opt_cmd}" "${@}" status=${?} else - init run_cmd "${@}" status=${?} - fini fi return ${status} |