Use local variables in log functions

This commit is contained in:
Shivam Mathur 2022-03-10 04:53:12 +05:30
parent e9884d0d9a
commit 035c0a8550
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -21,15 +21,15 @@ fi
# Function to log start of a operation.
step_log() {
message=$1
local message=$1
printf "\n\033[90;1m==> \033[0m\033[37;1m%s\033[0m\n" "$message"
}
# Function to log result of a operation.
add_log() {
mark=$1
subject=$2
message=$3
local mark=$1
local subject=$2
local message=$3
if [ "$mark" = "$tick" ]; then
printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message"
else