mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-10 22:13:48 -05:00
Updated to script template v1.3.0
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
version="1.1.1" # Sets version variable for this script
|
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:
|
# 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
|
# 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
|
utilsLocation="${scriptPath}/../lib/utils.sh" # Update this path to find the utilities.
|
||||||
source "${scriptPath}/../lib/utils.sh"
|
|
||||||
|
if [ -f "${utilsLocation}" ]; then
|
||||||
|
source "${utilsLocation}"
|
||||||
else
|
else
|
||||||
echo "Please find the file util.sh and add a reference to it in this script. Exiting."
|
echo "Please find the file util.sh and add a reference to it in this script. Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
@@ -674,13 +681,13 @@ will be deleted.
|
|||||||
|
|
||||||
$ convertMedia -i flac -o alac --delete
|
$ 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
|
||||||
|
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user