From: Richard Levitte Date: Tue, 20 Jan 2015 15:18:23 +0000 (+0100) Subject: Make the script a little more location agnostic X-Git-Tag: OpenSSL_1_0_2~54 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=27df27d4b9b3b6089c772641fb1e99a208859627;p=oweals%2Fopenssl.git Make the script a little more location agnostic Reviewed-by: Tim Hudson --- diff --git a/util/openssl-format-source b/util/openssl-format-source index 1e0185d5fb..162103f5e9 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"