From 7e0076ddae18c171513001d48f75a453ec5ad9be Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 13 Apr 2019 23:02:47 -0400 Subject: _suite_*_source(): Move before use --- (limited to 'src') diff --git a/src/suite.sh b/src/suite.sh index f38c9ca..e091fd7 100644 --- a/src/suite.sh +++ b/src/suite.sh @@ -20,35 +20,6 @@ # along with the ProteanOS Archive Manager. If not, see # . -copy_suite() -{ - local src_chan="${1}" - local src_dist="${2}" - local dst_chan="${3}" - local dst_dist="${4}" - shift 4 - - info "$(get_msg 'suite_copying')" \ - "${src_chan}" "${src_dist}" "${dst_chan}" "${dst_dist}" - - remove_suite "${dst_chan}" "${dst_dist}" - - db_foreach_source "${src_chan}" "${src_dist}" _suite_copy_source \ - "${dst_chan}" "${dst_dist}" -} - -remove_suite() -{ - local chan="${1}" - local dist="${2}" - shift 2 - - info "$(get_msg 'suite_removing')" \ - "${chan}" "${dist}" - - db_foreach_source "${chan}" "${dist}" _suite_remove_source -} - _suite_copy_source() { local src_chan="${1}" @@ -101,3 +72,32 @@ _suite_remove_source() remove_source_from_suite "${chan}" "${dist}" "${source}" } + +copy_suite() +{ + local src_chan="${1}" + local src_dist="${2}" + local dst_chan="${3}" + local dst_dist="${4}" + shift 4 + + info "$(get_msg 'suite_copying')" \ + "${src_chan}" "${src_dist}" "${dst_chan}" "${dst_dist}" + + remove_suite "${dst_chan}" "${dst_dist}" + + db_foreach_source "${src_chan}" "${src_dist}" _suite_copy_source \ + "${dst_chan}" "${dst_dist}" +} + +remove_suite() +{ + local chan="${1}" + local dist="${2}" + shift 2 + + info "$(get_msg 'suite_removing')" \ + "${chan}" "${dist}" + + db_foreach_source "${chan}" "${dist}" _suite_remove_source +} -- cgit v0.9.1