update music scripts
This commit is contained in:
19
private_dot_local/bin/executable_music_convert
Normal file
19
private_dot_local/bin/executable_music_convert
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
target="$1"
|
||||
shift
|
||||
|
||||
set -e
|
||||
|
||||
while [[ ! -z "$1" ]]
|
||||
do
|
||||
path="$1"
|
||||
shift
|
||||
|
||||
out="$(dirname "$path")/$(basename "$path" | sed -e 's/\.[^\.]*$//').$target"
|
||||
if [[ -z "$(echo "$out" | grep "\.$target\$")" ]]
|
||||
then
|
||||
out="$path.$target"
|
||||
fi
|
||||
ffmpeg -i "$path" "$out"
|
||||
done
|
||||
Reference in New Issue
Block a user