From c64e383dfcd1686630ad8bad1c2f86cdf019f157 Mon Sep 17 00:00:00 2001 From: Jan Houben Date: Fri, 8 Dec 2017 16:49:15 +0100 Subject: [PATCH] repo.sh: Show list of added packages on exit --- repo.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/repo.sh b/repo.sh index d244dd0..cbb11c1 100755 --- a/repo.sh +++ b/repo.sh @@ -13,6 +13,7 @@ repo_name="" # The destination repo for the packages package_list=() # A list of packages to add. Array items are in the form of "name;pkg.tar.xz;repo_path". package_src_list=() # A list of package sources to move package_exist_list=() +all_added_pkgs=() # A list of all packages, that were added to the repo haz_error=0 @@ -271,6 +272,7 @@ repo_add() { bname=$(basename ${pkgp}) pkg_add_list+=("${dest}/${bname}") + all_added_pkgs+=("${bname}") done debug_print_array "pkg_cp_list" "${pkg_cp_list[@]}" @@ -379,6 +381,13 @@ for (( i = 0; i < ${#modes[@]}; i++ )); do done done +if [[ ${#all_added_pkgs[@]} -gt 0 ]]; then + msg2 "${#all_added_pkgs[@]} packages were added to the repo:" + printf '%s\n' "${all_added_pkgs[@]}" +else + msg2 "No packages were added to the repo" +fi + if [[ ${haz_error} -ne 0 ]]; then warning "An error has been detected! Inspect output above closely..." fi