summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/common.sh b/lib/common.sh
index 22b017c..ee5dcb5 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -38,3 +38,13 @@ _ob_return()
return ${1}
}
+
+_ob_validate_var_name()
+{
+ case "${1}" in
+ [!a-zA-Z_]*|*[!a-zA-Z0-9_]*)
+ return 1
+ ;;
+ esac
+ return 0
+}