mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-01 16:43:08 +01:00
17 lines
492 B
Plaintext
17 lines
492 B
Plaintext
|
#!/usr/bin/env zsh
|
||
|
|
||
|
selection=$(find /etc/yum.repos.d -type f -name "*.repo" | gum choose --no-limit)
|
||
|
|
||
|
format_string_array=(
|
||
|
"# You selected the following repo file(s):\n"
|
||
|
)
|
||
|
|
||
|
echo "$selection" | while read -r line; do format_string_array+=("- $line\n"); done
|
||
|
echo "${format_string_array[@]}" | gum format
|
||
|
echo ""
|
||
|
if gum confirm "Are you sure you want to delete?"; then
|
||
|
sudo rm -v $(echo "$selection")
|
||
|
else
|
||
|
echo ":raised_eyebrow: Oh, okay then. Carry on." | gum format -t emoji
|
||
|
fi
|