diff options
author | Martin Langhoff <martin@laptop.org> | 2012-07-20 14:38:22 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2012-08-20 20:32:30 (GMT) |
commit | 14ed75647fdd7aed4330ce1c973ca84073bc1c19 (patch) | |
tree | 998dbaefb68ca1b11978cdf417fcd39c3cfc5f92 /lib | |
parent | 92a911f8c468c42f6c3880aeee824f2e13438670 (diff) |
Introduce --cache-only boolean option, propagate to modules
Along the way, add basic support for handling boolean
values in python and shell scripts in modules.
[dsd: trivial tweaks: renamed to --cache-only, use variable presence in
environment for boolean testing, add documentation]
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ooblib.py | 2 | ||||
-rw-r--r-- | lib/shlib.sh | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/ooblib.py b/lib/ooblib.py index 8d6dd2d..13babbc 100644 --- a/lib/ooblib.py +++ b/lib/ooblib.py @@ -17,6 +17,8 @@ fsmount = os.environ['OOB__fsmount'] METADATA_NS = "http://linux.duke.edu/metadata/common" +cacheonly = 'OOB__cacheonly' in os.environ + def read_config(module, option): vname = "CFG_%s__%s" % (module, option) if not vname in os.environ: diff --git a/lib/shlib.sh b/lib/shlib.sh index 34982b0..11324c2 100644 --- a/lib/shlib.sh +++ b/lib/shlib.sh @@ -7,6 +7,7 @@ libdir=$OOB__libdir bindir=$OOB__bindir builddir=$OOB__builddir cachedir=$OOB__cachedir +cacheonly=$OOB__cacheonly intermediatesdir=$OOB__intermediatesdir outputdir=$OOB__outputdir statedir=$OOB__statedir @@ -78,4 +79,3 @@ install_sugar_bundle() { mkdir -p "$intermediatesdir/shared/sugar-bundles" ln_or_cp "$1" "$intermediatesdir/shared/sugar-bundles" } - |