mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 13:18:35 -06:00
Bug fixes
This commit is contained in:
parent
5b41513057
commit
2ae3a8ec4c
1 changed files with 4 additions and 4 deletions
|
@ -9,11 +9,11 @@ for f in *.mp4; do
|
||||||
h=$(basename "$f" .mp4)
|
h=$(basename "$f" .mp4)
|
||||||
echo "Renaming the subtitle (if any) accompanying $h.mp4..."
|
echo "Renaming the subtitle (if any) accompanying $h.mp4..."
|
||||||
n=$(find . -maxdepth 2 -name "*.srt" -printf '.' | wc -m)
|
n=$(find . -maxdepth 2 -name "*.srt" -printf '.' | wc -m)
|
||||||
if [ $n -eq 1 ] && ! [ -f $h.srt ]; then
|
if [ $n -eq 1 ] && ! [ -f "$h.srt" ]; then
|
||||||
find . -maxdepth 2 -name "*.srt" -exec mv {} $h.srt \;
|
find . -maxdepth 2 -name "*.srt" -exec mv "{}" "$h.srt" \;
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
else
|
else
|
||||||
echo "Unable to find unique srt file that needs to be renamed."
|
echo "Unable to find unique srt file that needs to be renamed. It might already have the proper name."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
Loading…
Reference in a new issue