Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
  • chris/dotfiles
1 result
Select Git revision
Loading items
Show changes
Commits on Source (2)
......@@ -36,6 +36,10 @@ Options:
-f
This script will attempt to fix any issues it finds.
-b <bts-prefix>
This allows you to specify a prefix to prepend to the names of "Behind the
Scenes" files.
-d
When fixing video dimension issues, preserve the display dimensions.
......@@ -53,11 +57,15 @@ EOF
flag_f=0
flag_d=0
flag_p=0
while getopts 'fdph' flag; do
bts_prefix=''
while getopts 'fb:dph' flag; do
case "${flag}" in
f)
flag_f=1
;;
b)
bts_prefix="$OPTARG"
;;
d)
flag_d=1
;;
......@@ -113,6 +121,13 @@ while IFS= read -rd '' file <&3; do
if [[ $flag_f -eq 1 ]]; then
new_title="$(basename "$file")" # get the filename
new_title="${new_title%.*}" # remove the extension
new_title="${new_title/% ([0-9][0-9][0-9][0-9])/}" # remove the year
# If this file is a 'Behind The Scenes' file add the prefix
if [[ -n $bts_prefix && "$(dirname "$file")" =~ [Bb]ehind\ [Tt]he\ [Ss]cenes$ ]]; then
new_title="$bts_prefix$new_title"
fi
echo -n "Enter a title, or s to skip [$new_title]: "
read -e user_title
new_title="${user_title:-$new_title}"
......