Declare variables in functions as local.
This commit is contained in:
parent
ec4cf00257
commit
041aab4956
1 changed files with 5 additions and 5 deletions
10
functions.sh
10
functions.sh
|
@ -1,15 +1,15 @@
|
||||||
sit_fail() {
|
sit_fail() {
|
||||||
msg="SIT: Fail: $1"
|
local msg="SIT: Fail: $1"
|
||||||
echo "$msg"
|
echo "$msg"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
sit_warn() {
|
sit_warn() {
|
||||||
msg=$1
|
local msg=$1
|
||||||
echo "SIT: Warning: " $msg
|
echo "SIT: Warning: $msg"
|
||||||
}
|
}
|
||||||
sit_info() {
|
sit_info() {
|
||||||
msg=$1
|
local msg=$1
|
||||||
echo "SIT: " $msg
|
echo "SIT: $msg"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue