scripts

Scripts
git clone git://git.wimdupont.com/scripts.git
Log | Files | Refs | LICENSE

commit e4e7eae37fb25c3a2c121bbf11265b1b3d583f5b
parent 2b04dc8ab133b7619ea79eda8b2e9375baff1688
Author: Wim Dupont <wim@wimdupont.com>
Date:   Sat, 27 Apr 2024 19:41:49 +0200

use checklist for file selection

Diffstat:
Mbin/auru | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bin/auru b/bin/auru @@ -13,7 +13,11 @@ for aur in "${AUR_LIST[@]}"; do makepkg -rcsi - IFS='|' read -ra to_delete <<< $(zenity --file-selection --title "Select old-version files to delete." --filename "${aur}/*" --multiple) + readarray -td '' custom_wads < <( + printf -- 'choice\0%s\0' "${aur}/"* + ) + + IFS='|' read -ra to_delete <<< $(zenity --list --checklist --multiple --width=400 --height=500 --column=Choice --column=AUR --title "Select old-version files to delete." "${custom_wads[@]}") for file_to_delete in "${to_delete[@]}"; do rm -rfv "${file_to_delete}"