diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-13 23:02:47 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-13 23:02:47 (EDT) |
commit | 7e0076ddae18c171513001d48f75a453ec5ad9be (patch) | |
tree | 27ee3d9099569ead25055e4edb04f71ce85e32e3 | |
parent | 68ba570c6906ae839c23317295e114da5f23df53 (diff) |
_suite_*_source(): Move before use
-rw-r--r-- | src/suite.sh | 58 |
1 files changed, 29 insertions, 29 deletions
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 # <http://www.gnu.org/licenses/>. -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 +} |