summaryrefslogtreecommitdiffhomepage
path: root/scripts/utils.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r--scripts/utils.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh
index 01d8ad5..a5dc782 100644
--- a/scripts/utils.sh
+++ b/scripts/utils.sh
@@ -13,6 +13,12 @@ add_default_handler() {
esac
}
+set_default() {
+ local __s_var="$1"
+ local __s_val="$2"
+ eval "export -- \"$__s_var=\${$__s_var:-\$__s_val}\""
+}
+
_config_add_generic() {
local type="$1"; shift