Make sure loh_helpers is sourced only once
This commit is contained in:
parent
27086af023
commit
8a655ae1a2
11
log_helpers
11
log_helpers
@ -1,11 +1,8 @@
|
||||
#!/bin/bash
|
||||
# set -x
|
||||
|
||||
#if [ ${log_helpers_sourced:-1} = "1" ]; then
|
||||
# readonly log_helpers_sourced=${BASH_SOURCE[0]}
|
||||
#else
|
||||
# return 0
|
||||
#fi
|
||||
if [ ${log_helpers_sourced:-1} = "1" ]; then # include ony once
|
||||
readonly log_helpers_sourced=${BASH_SOURCE[0]}
|
||||
|
||||
readonly log_file=/var/log/update_controller.log
|
||||
if ! [ -f "$log_file" ]; then
|
||||
@ -79,5 +76,5 @@ log_fatal() {
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# log "test message1" "test message2"
|
||||
###############################################################################
|
||||
fi ### include guard
|
||||
|
Loading…
Reference in New Issue
Block a user