#!/bin/bash source bashcols defcol orange 202 scr_dir=$(dirname "$0") source "$scr_dir/music_tagmove_lib" SPLIT='NO' while true; do case "$1" in '-n'|'--dry-run') DRY_RUN=1 shift ;; '-s'|'--split') SPLIT='YES' shift ;; '-y'|'--yes') YES=1 shift ;; *) break ;; esac done source_dir="$1" dest_root="$2" printf "======= MUSIC TAGMOVE =======\n> Source dir: %s\n> Dest root: %s\n> Split: %s\n\n" \ "$source_dir" "$dest_root" "$SPLIT" if [[ -z $YES ]]; then if [[ -z $DRY_RUN ]]; then orange printf "REAL RUN - FS WILL BE MODIFIED. CONTINUE? [y/n] " read -r user_choice if ! [[ $user_choice =~ ^[yY] ]]; then exit 0 fi fi fi if [[ $SPLIT == YES ]]; then cuesplit_all fi tagmove cyan echo -e "\n------- EXECUTION COMPLETE -------\n" if print_error_stack; then exit 1 else exit 0 fi