X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-functions;h=7100603b474148bfebad4c943167d3323d7c6e92;hb=3d52fbcb4fe70132ade14759d76573b471294800;hp=60721b4d08bede1ed9fb5fcc8730e38feb7e9c5a;hpb=9fc9e2a1a11b0edada38cb501fefe4f58aa414ac;p=live-boot-grml.git 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}" +}