diff options
Diffstat (limited to 'auto-void-packages/auto-build-all-orphans.sh')
-rwxr-xr-x | auto-void-packages/auto-build-all-orphans.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/auto-void-packages/auto-build-all-orphans.sh b/auto-void-packages/auto-build-all-orphans.sh index 373a058..8c4c8cf 100755 --- a/auto-void-packages/auto-build-all-orphans.sh +++ b/auto-void-packages/auto-build-all-orphans.sh @@ -42,6 +42,7 @@ typeset package="" typeset -A pkgs_to_update=() typeset -i nb_of_pkgs_to_build=0 +typeset pkgs_to_update_fp="/tmp/pkgs_to_update.txt" typeset pkgs_to_exclude="" typeset auto_build_archs_path="" typeset -i pkg_counter=0 @@ -109,10 +110,15 @@ do done stop_spinner +# Infos echo -n "Number of orphan packages needing an update : " ; printf_green "${#pkgs_to_update[@]}" echo -n "Number of orphan packages you want to build : " ; printf_red "$nb_of_pkgs_to_build" echo -n "Packages you want to exclude : " ; printf_red "$pkgs_to_exclude" +# Saving the content of the pkgs_to_update to a file +[ -f $pkgs_to_update_fp ] && rm $pkgs_to_update_fp +echo "${!pkgs_to_update[@]}" > $pkgs_to_update_fp + [ $nb_of_pkgs_to_build == 0 ] && exit 1 echo "Executing update-git-repo.sh" @@ -120,15 +126,10 @@ echo "Executing update-git-repo.sh" for package in "${!pkgs_to_update[@]}"; do - echo "DEBUG : package : $package" - # If the currently selected package is in the exclude list, continue to the next package - if echo "$pkgs_to_exclude" | grep -q "$package"; then #TODO - echo "DEBUG : before continue" + if echo "$package" | grep -q -E "^($(echo "$pkgs_to_exclude" | tr ',' '|'))"; then continue - echo "DEBUG : after continue" fi - echo "DEBUG : after if exclude" # If we've hit the max number of packages asked by the user, break the loop if [ $pkg_counter -ge $nb_of_pkgs_to_build ]; then @@ -137,9 +138,11 @@ for package in "${!pkgs_to_update[@]}"; do latest_version="${pkgs_to_update[$package]}" auto_build_archs_path="$HOME/workbench/auto-void-packages/auto-build/archs-${package}-${latest_version}.txt" - echo "[$package - $latest_version]" + echo ">>>[$package - $latest_version]>>>" ./update-package.sh "$package" "$latest_version" "$auto_build_archs_path" + echo "<<<[$package - $latest_version]<<<" + ((pkg_counter++)) done |