Initial commit
This commit is contained in:
15
include/shell.sh
Normal file
15
include/shell.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
getvar() {
|
||||
eval "echo \"\${$1}\""
|
||||
}
|
||||
|
||||
var2file() {
|
||||
local var
|
||||
eval "var=\"\${$1}\""
|
||||
if [ -n "$var" ]; then echo "$var" > "$2"; fi
|
||||
}
|
||||
|
||||
isset() {
|
||||
local var
|
||||
eval "var=\"\${$1}\""
|
||||
[ -n "$var" ]
|
||||
}
|
||||
Reference in New Issue
Block a user