mirror of
https://github.com/ManchildProductions/UXP-Fixed.git
synced 2026-05-27 15:38:33 +00:00
6168dbe21f
https://hg.mozilla.org/projects/htmlparser/ Commit: abe62ab2a9b69ccb3b5d8a231ec1ae11154c571d
24 lines
355 B
Bash
24 lines
355 B
Bash
#!/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
|
|
}
|