diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-04-05 11:20:41 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-04-05 11:20:41 +0300 |
commit | 4de12ef40f9ea9a0b715903cfe6da51b97eedb77 (patch) | |
tree | 84a0c8d117e9a2a629e186a1fe22ebe185e5d6a4 /extras/gawk.sh | |
parent | 14da33f5ac17b4adfd15ddb12c07715741bd1b1f (diff) | |
parent | dbf9d5a4fc4b6d6340912395f020019576ed37f6 (diff) | |
download | egawk-4de12ef40f9ea9a0b715903cfe6da51b97eedb77.tar.gz egawk-4de12ef40f9ea9a0b715903cfe6da51b97eedb77.tar.bz2 egawk-4de12ef40f9ea9a0b715903cfe6da51b97eedb77.zip |
Merge branch 'master' into cmake
Diffstat (limited to 'extras/gawk.sh')
-rw-r--r-- | extras/gawk.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/extras/gawk.sh b/extras/gawk.sh new file mode 100644 index 00000000..c35471fa --- /dev/null +++ b/extras/gawk.sh @@ -0,0 +1,31 @@ +gawkpath_default () { + unset AWKPATH + export AWKPATH=`gawk 'BEGIN {print ENVIRON["AWKPATH"]}'` +} + +gawkpath_prepend () { + [ -z "$AWKPATH" ] && AWKPATH=`gawk 'BEGIN {print ENVIRON["AWKPATH"]}'` + export AWKPATH="$*:$AWKPATH" +} + +gawkpath_append () { + [ -z "$AWKPATH" ] && AWKPATH=`gawk 'BEGIN {print ENVIRON["AWKPATH"]}'` + export AWKPATH="$AWKPATH:$*" +} + +gawklibpath_default () { + unset AWKLIBPATH + export AWKLIBPATH=`gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'` +} + +gawklibpath_prepend () { + [ -z "$AWKLIBPATH" ] && \ + AWKLIBPATH=`gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'` + export AWKLIBPATH="$*:$AWKLIBPATH" +} + +gawklibpath_append () { + [ -z "$AWKLIBPATH" ] && \ + AWKLIBPATH=`gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'` + export AWKLIBPATH="$AWKLIBPATH:$*" +} |