mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-10 06:03:47 -05:00
added script headers
This commit is contained in:
@@ -100,6 +100,10 @@ logFile="$HOME/Library/Logs/${scriptBasename}.log"
|
|||||||
function mainScript() {
|
function mainScript() {
|
||||||
############## Begin Script Here ###################
|
############## Begin Script Here ###################
|
||||||
|
|
||||||
|
header "Beginning ${scriptName}"
|
||||||
|
|
||||||
|
notify "test"
|
||||||
|
|
||||||
# Set Variables
|
# Set Variables
|
||||||
LISTINSTALLED="brew list"
|
LISTINSTALLED="brew list"
|
||||||
INSTALLCOMMAND="brew install"
|
INSTALLCOMMAND="brew install"
|
||||||
@@ -163,7 +167,6 @@ htopPermissions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Run Functions
|
# Run Functions
|
||||||
|
|
||||||
hasHomebrew
|
hasHomebrew
|
||||||
brewMaintenance
|
brewMaintenance
|
||||||
doInstall
|
doInstall
|
||||||
@@ -171,7 +174,7 @@ install-ffmpeg
|
|||||||
htopPermissions
|
htopPermissions
|
||||||
brewCleanup
|
brewCleanup
|
||||||
|
|
||||||
|
header "Ending ${scriptName}"
|
||||||
|
|
||||||
############## End Script Here ###################
|
############## End Script Here ###################
|
||||||
}
|
}
|
||||||
@@ -271,7 +274,7 @@ done
|
|||||||
# ############# ############# #############
|
# ############# ############# #############
|
||||||
|
|
||||||
# Trap bad exits with your cleanup function
|
# Trap bad exits with your cleanup function
|
||||||
trap trapCleanup INT TERM
|
trap trapCleanup EXIT INT TERM
|
||||||
|
|
||||||
# Exit on error. Append ||true if you expect an error.
|
# Exit on error. Append ||true if you expect an error.
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|||||||
Reference in New Issue
Block a user