Unified · Split
| @@ -64,11 +64,9 @@ SAVE=0 · 63 unmodified lines | |||
| 64 | NASK=0 | 64 | NASK=0 |
| 65 | unset PIC INPATH CUE CHARSET | 65 | unset PIC INPATH CUE CHARSET |
| 66 | FORCE=0 | 66 | FORCE=0 |
| 67 | e="\${ENCARGS_${FORMAT}}" | ||
| 68 | ENCARGS=`eval echo "$e"` | ||
| 69 | ENCHELP=0 | ||
| 70 | 67 | ||
| 71 | VERSION=unknown | 68 | # do not forget to update before commit |
| 69 | VERSION=80 | ||
| 72 | 70 | ||
| 73 | HELP="\${cG}split2flac version: ${VERSION} | 71 | HELP="\${cG}split2flac version: ${VERSION} |
| 74 | Splits one big \${cU}APE/FLAC/WV/WAV\$cZ\$cG audio image (or a collection) into \${cU}FLAC/M4A/MP3/OGG_VORBIS/WAV\$cZ\$cG tracks with tagging and renaming. | 72 | Splits one big \${cU}APE/FLAC/WV/WAV\$cZ\$cG audio image (or a collection) into \${cU}FLAC/M4A/MP3/OGG_VORBIS/WAV\$cZ\$cG tracks with tagging and renaming. |
| @@ -117,6 +115,12 @@ emsg () { · 42 unmodified lines | |||
| 117 | $msg "${cR}$1${cZ}" | 115 | $msg "${cR}$1${cZ}" |
| 118 | } | 116 | } |
| 119 | 117 | ||
| 118 | update_encargs () { | ||
| 119 | e="\${ENCARGS_${FORMAT}}" | ||
| 120 | ENCARGS=`eval echo "$e"` | ||
| 121 | ENCHELP=0 | ||
| 122 | } | ||
| 123 | |||
| 120 | update_colors () { | 124 | update_colors () { |
| 121 | if [ "${NOCOLORS}" -eq 0 ]; then | 125 | if [ "${NOCOLORS}" -eq 0 ]; then |
| 122 | cR="\033[31m" | 126 | cR="\033[31m" |
| @@ -130,6 +134,7 @@ update_colors () { · 7 unmodified lines | |||
| 130 | fi | 134 | fi |
| 131 | } | 135 | } |
| 132 | 136 | ||
| 137 | update_encargs | ||
| 133 | update_colors | 138 | update_colors |
| 134 | 139 | ||
| 135 | # parse arguments | 140 | # parse arguments |
| @@ -140,7 +145,7 @@ while [ "$1" ]; do · 4 unmodified lines | |||
| 140 | -cue) CUE=$2; shift;; | 145 | -cue) CUE=$2; shift;; |
| 141 | -cuecharset) CHARSET=$2; shift;; | 146 | -cuecharset) CHARSET=$2; shift;; |
| 142 | -nask) NASK=1;; | 147 | -nask) NASK=1;; |
| 143 | -f) FORMAT=$2; shift;; | 148 | -f) FORMAT=$2; update_encargs; shift;; |
| 144 | -e) ENCARGS=$2; shift;; | 149 | -e) ENCARGS=$2; shift;; |
| 145 | -eh) ENCHELP=1;; | 150 | -eh) ENCHELP=1;; |
| 146 | -c) NOPIC=0; PIC=$2; shift;; | 151 | -c) NOPIC=0; PIC=$2; shift;; |