diff options
author | Richard Levitte <richard@levitte.org> | 2015-01-20 15:14:24 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-01-22 09:20:07 +0000 |
commit | d09481a10fa8cc80f15c640877adddda733140bc (patch) | |
tree | 8416df8413a57f5b688d30690c8e528258659915 /util/openssl-format-source | |
parent | 849c80bc5ddb122e06effb39a7a0be2bf2cf4cbe (diff) |
Force the use of our indent profile
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'util/openssl-format-source')
-rwxr-xr-x | util/openssl-format-source | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/util/openssl-format-source b/util/openssl-format-source index c1aada7d37..a814e1f822 100755 --- a/util/openssl-format-source +++ b/util/openssl-format-source @@ -30,33 +30,12 @@ DONT=false STOPARGS=false COMMENTS=false -# locate the indent configuration file to use which generally will be -# in the current directory but might be elsewhere and we want consistent -# use of the file so we set the env var to point directly to the file in -# our priority order -if [ -z "$INDENT_PROFILE" ]; then - for i in . ../openssl $HOME - do - if [ -f "$i/.indent.pro" ]; then - INDENT_PROFILE="$i/.indent.pro" - export INDENT_PROFILE - break - fi - done -fi - -if [ -z "$INDENT_PROFILE" ]; then - # If at the top of the source tree, try the file in util - if [ -f "e_os.h" ]; then - f=`/bin/pwd`/util/indent.pro - if [ -f $f ]; then - INDENT_PROFILE=$f - export INDENT_PROFILE - fi - fi -fi -if [ -z "$INDENT_PROFILE" ]; then - echo "$0: unable to locate .indent.pro file " >&2 +# 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" +export INDENT_PROFILE +if [ -f "$INDENT_PROFILE" ]; then + echo "$0: unable to locate the openssl indent.pro file" >&2 exit 1 fi |