Created
February 26, 2021 10:53
-
-
Save daniellowtw/c1665b496808bc6f4fadbdc454892e67 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eu | |
doWork() { | |
# make modifications here | |
git br -d $i | |
} | |
for i in $(ls); do | |
echo $i | |
read -p "Delete [y/N]? " answer | |
case $answer in | |
[yY]*) | |
doWork "$i" | |
echo -e "\e[31m Processed\e[0m $i" | |
;; | |
*) | |
echo -e "\e[32m Moving on... \e[0m" | |
;; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment