summaryrefslogtreecommitdiff
path: root/parser/html/java/htmlparser/mozilla-export-scripts/util.sh
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-01-15 14:56:04 -0500
committerMatt A. Tobin <email@mattatobin.com>2020-01-15 14:56:04 -0500
commit6168dbe21f5f83b906e562ea0ab232d499b275a6 (patch)
tree658a4b27554c85ebcaad655fc83f2c2bb99e8e80 /parser/html/java/htmlparser/mozilla-export-scripts/util.sh
parent09314667a692fedff8564fc347c8a3663474faa6 (diff)
downloaduxp-6168dbe21f5f83b906e562ea0ab232d499b275a6.tar.gz
Add java htmlparser sources that match the original 52-level state
https://hg.mozilla.org/projects/htmlparser/ Commit: abe62ab2a9b69ccb3b5d8a231ec1ae11154c571d
Diffstat (limited to 'parser/html/java/htmlparser/mozilla-export-scripts/util.sh')
-rw-r--r--parser/html/java/htmlparser/mozilla-export-scripts/util.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/parser/html/java/htmlparser/mozilla-export-scripts/util.sh b/parser/html/java/htmlparser/mozilla-export-scripts/util.sh
new file mode 100644
index 0000000000..348ca14f9f
--- /dev/null
+++ b/parser/html/java/htmlparser/mozilla-export-scripts/util.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env sh
+
+abs() {
+ local rel
+ local p
+ if [ $# -ne 1 ]
+ then
+ rel=.
+ else
+ rel=$1
+ fi
+ if [ -d $rel ]
+ then
+ pushd $rel > /dev/null
+ p=`pwd`
+ popd > /dev/null
+ else
+ pushd `dirname $rel` > /dev/null
+ p=`pwd`/`basename $rel`
+ popd > /dev/null
+ fi
+ echo $p
+}