🏠 base.sh
This is a base script used to define common utility functions for other scripts in the project.
It contains the following key features:
- Date format definition: Defines a date format that is used throughout the scripts.
- Colour codes: Sets up color codes for console logging if the terminal is recognized as an xterm.
- Logging functions: Includes
echoError
,echoWarn
,echoInfo
, andechoOk
which log messages to the console with a timestamp, color-coded based on their severity (error, warning, information, success respectively). - Existence checks: Implements the
exitIfNotExists
andexitIfNoGit
functions which check for the existence of a file and the Git software, respectively. They log an error and terminate the script with an appropriate exit code if the check fails.