aboutsummaryrefslogtreecommitdiff
path: root/util/openssl-format-source
diff options
context:
space:
mode:
authorRichard Levitte <richard@levitte.org>2015-01-20 16:18:23 +0100
committerMatt Caswell <matt@openssl.org>2015-01-22 09:20:07 +0000
commit2f1ac20bb3450e146f6f2fb88b3745e8a59dc28f (patch)
treeb5873da49313dcd4fc55bed1952a6595f2fd938d /util/openssl-format-source
parentacb82df4d368027e2fab7dde18f52fcefffbd0e9 (diff)
downloadopenssl-2f1ac20bb3450e146f6f2fb88b3745e8a59dc28f.zip
openssl-2f1ac20bb3450e146f6f2fb88b3745e8a59dc28f.tar.gz
openssl-2f1ac20bb3450e146f6f2fb88b3745e8a59dc28f.tar.bz2
Make the script a little more location agnostic
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'util/openssl-format-source')
-rwxr-xr-xutil/openssl-format-source5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/openssl-format-source b/util/openssl-format-source
index 1e0185d..162103f 100755
--- a/util/openssl-format-source
+++ b/util/openssl-format-source
@@ -17,6 +17,7 @@
PATH=/usr/local/bin:/bin:/usr/bin:$PATH
export PATH
+HERE="`dirname $0`"
set -e
@@ -32,7 +33,7 @@ COMMENTS=false
# for this exercise, we want to force the openssl style, so we roll
# our own indent profile, which is at a well known location
-INDENT_PROFILE="`dirname $0`/indent.pro"
+INDENT_PROFILE="$HERE/indent.pro"
export INDENT_PROFILE
if [ -f "$INDENT_PROFILE" ]; then
echo "$0: unable to locate the openssl indent.pro file" >&2
@@ -124,7 +125,7 @@ do
| perl -np \
-e 's/(STACK_OF|LHASH_OF)_([^ \t,]+)_( |\/)/$1($2)$3/g;' \
-e 's/(STACK_OF|LHASH_OF)_([^ \t,]+)_$/$1($2)/g;' \
- | perl util/su-filter.pl \
+ | perl "$HERE"/su-filter.pl \
> "$tmp"
else
expand "$j" | indent $INDENT_ARGS > "$tmp"