change if/elif statements to a case statement
1 files changed, 15 insertions(+), 11 deletions(-) M bc-lyrics
M bc-lyrics => bc-lyrics +15 -11
@@ 38,17 38,21 @@ track="$(mpc -f %title% | head -n1 | eval "$url_filter" | sed 's/\ /-/g')" ## Change variables as needed # Most likely; variations will need to be made for every artist # Will just have to add them as they come /shrug if [ "$artist" = "Guerrilla Warfare" ]; then artist="gwarfareband.bandcamp" mkurl elif [ "$artist" = "Rabbit Junk" ]; then artist="rabbitjunk" mkurl elif [ "$artist" = "System Of A Down" ]; then artist="systemofadown.bandcamp" track="$track-2" mkurl fi case "$artist" in "Guerrilla Warfare") artist="gwarfareband.bandcamp" mkurl ;; "Rabbit Junk") artist="rabbitjunk" mkurl ;; "System Of A Down") artist="systemofadown.bandcamp" track="$track-2" mkurl ;; esac ## Output example: ##