From: Samir Benmendil Date: Sat, 17 Nov 2012 20:31:05 +0000 (+0100) Subject: make it work for webm X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/03dd75c185cfd4e8ae6490120018257a4a0ad63e?ds=inline make it work for webm --- diff --git a/bin/mkvsettitle b/bin/mkvsettitle index 71619c3..f9a8c8d 100755 --- a/bin/mkvsettitle +++ b/bin/mkvsettitle @@ -2,7 +2,13 @@ # sets the title of all mkv videos to the filename without extension dir=${1-.} -for f in "$dir"/*.mkv; do - t=$(basename "$f" .mkv) +for f in "$dir"/*; do + case "$f" in + *.mkv) ext=mkv ;; + *.webm) ext=webm ;; + *) continue ;; + esac + t=$(basename "$f" "$ext") + t=${t%.*} mkvpropedit --set title="$t" "$f" > /dev/null done