summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGalen Guyer <galen@galenguyer.com>2022-08-16 13:01:13 -0400
committerGalen Guyer <galen@galenguyer.com>2022-08-16 13:01:13 -0400
commitfe808a0b8bc5acdd715ae3903c83a9d2d1e43aa2 (patch)
tree99a3cb32fe5503c01502891bf2da93cd225617a9
parent69f4428fc03ffa03d47f6525fcb65fa48b5f76aa (diff)
add custom module names
-rw-r--r--lib/log.sh1
-rw-r--r--modules/40-git/install.sh1
-rw-r--r--modules/40-neofetch/install.sh1
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/log.sh b/lib/log.sh
index f204d7e..8a0c611 100644
--- a/lib/log.sh
+++ b/lib/log.sh
@@ -33,6 +33,7 @@ function log() {
[[ "$DOT_LOG_LEVEL" -gt "$level" ]] && return
[[ -n "$_modulename" ]] && module="[$_modulename]: " || module=""
+ [[ -n "$DOT_MODULE_NAME" ]] && module="[$DOT_MODULE_NAME]: "
echo "$log_level_string $module$@"
}
diff --git a/modules/40-git/install.sh b/modules/40-git/install.sh
index 384f539..61374e9 100644
--- a/modules/40-git/install.sh
+++ b/modules/40-git/install.sh
@@ -2,6 +2,7 @@ _script="$(realpath ${BASH_SOURCE[0]})"
_scriptname="$(basename $_script)"
_scriptdir="$(dirname $_script)"
_modulename="$(basename $_scriptdir)"
+DOT_MODULE_NAME="git"
function preinstall() {
if ! [[ -x "$(command -v git)" ]]; then
diff --git a/modules/40-neofetch/install.sh b/modules/40-neofetch/install.sh
index c432a71..81968ae 100644
--- a/modules/40-neofetch/install.sh
+++ b/modules/40-neofetch/install.sh
@@ -2,6 +2,7 @@ _script="$(realpath ${BASH_SOURCE[0]})"
_scriptname="$(basename $_script)"
_scriptdir="$(dirname $_script)"
_modulename="$(basename $_scriptdir)"
+DOT_MODULE_NAME="neofetch"
function preinstall() {
if ! [[ -x "$(command -v neofetch)" ]]; then