diff --git a/bin/convertMedia b/bin/convertMedia index 2ee8f44..71c1d97 100755 --- a/bin/convertMedia +++ b/bin/convertMedia @@ -5,7 +5,7 @@ # version="1.1.1" # Sets version variable for this script # -scriptTemplateVersion="1.2.0" # Version of scriptTemplate.sh that this script is based on +scriptTemplateVersion="1.3.0" # Version of scriptTemplate.sh that this script is based on # # # HISTORY: @@ -16,13 +16,20 @@ scriptTemplateVersion="1.2.0" # Version of scriptTemplate.sh that this script is # # ################################################## +# Provide a variable with the location of this script. +scriptPath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + # Source Scripting Utilities # ----------------------------------- -# If these can't be found, update the path to the file +# These shared utilities provide many functions which are needed to provide +# the functionality in this boilerplate. This script will fail if they can +# not be found. # ----------------------------------- -scriptPath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -if [ -f "${scriptPath}/../lib/utils.sh" ]; then - source "${scriptPath}/../lib/utils.sh" + +utilsLocation="${scriptPath}/../lib/utils.sh" # Update this path to find the utilities. + +if [ -f "${utilsLocation}" ]; then + source "${utilsLocation}" else echo "Please find the file util.sh and add a reference to it in this script. Exiting." exit 1 @@ -674,13 +681,13 @@ will be deleted. $ convertMedia -i flac -o alac --delete -Convert all 1080p mkv files in a directory to 720p. +Search for all 1080p files in a directory and downsize them to 720p. - $ convertMedia -i mkv --downsize720 + $ convertMedia --downsize720 -Convert a Windows Media file (WMV) to H264 (mp4). +Convert a Windows Media file (file.wmv) to h264 (mp4). - $ convertMedia -f file.wmv -o mp4 + $ convertMedia -o mp4 file.wmv " }