summaryrefslogtreecommitdiff
path: root/scripts/live-functions
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/live-functions')
-rw-r--r--scripts/live-functions14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/live-functions b/scripts/live-functions
index 60721b4..7100603 100644
--- a/scripts/live-functions
+++ b/scripts/live-functions
@@ -1,5 +1,6 @@
. /scripts/functions
+. /live.vars
# Override this so we don't call PROGRESS
log_end_msg()
@@ -19,3 +20,16 @@ log_wait_msg()
fi
_log_msg "Waiting: $@ ..."
}
+
+really_export ()
+{
+ STRING="${1}"
+ VALUE="$(eval echo -n \${$STRING})"
+
+ if [ -f /live.vars ] && cat /live.vars | grep -sq "export ${STRING}" ; then
+ sed -i -e 's/\('${STRING}'=\).*$/\1'${VALUE}'/' /live.vars
+ else
+ echo "export ${STRING}=\"${VALUE}\"" >> /live.vars
+ fi
+ eval export "${STRING}"="${VALUE}"
+}