File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,8 +10,13 @@ PROG=${0##*/}
1010# Default starting directory is Maven2 repository under $HOME ...
1111starting_dir=$HOME /.m2/repository
1212
13+ # If we are on Cygwin on Windows, the Maven repo may be under $USERPROFILE.
14+ if [[ $( uname -o) == " Cygwin" && ! -d " $starting_dir " ]]
15+ then starting_dir=" $( cygpath --unix ${USERPROFILE:- $HOME } /.m2/repository) "
16+ fi
17+
1318case " $1 " in
14- -start) shift ; starting_dir=" $1 " ; shift ;;
19+ -start) shift ; starting_dir=" $1 " ; shift ;; # Expected to be right if provided
1520-\? ) echo " $USAGE " >&2 ; exit 2 ;;
1621-* ) echo " $PROG : Unknown option: $1 ; treating as a jar pattern." >&2 ;;
1722esac
2530
2631# echo "Starting location: $starting_dir" # DEBUG
2732# echo "Jar pattern: $jar_pattern" # DEBUG
28- find " $starting_dir " -type f -name " $jar_pattern " -print |
29- egrep -v ' javadoc|sources'
33+ if [[ -d " $starting_dir " ]]
34+ then
35+ find " $starting_dir " -type f -name " $jar_pattern " -print |
36+ egrep -v ' javadoc|sources'
37+ else
38+ echo " $PROG : Can't find starting directory for Maven repo: $starting_dir " >&2
39+ exit 1
40+ fi
Original file line number Diff line number Diff line change 11# /bin/bash
22# Purpose: Use to set up environment to compile and run examples if ESAPI
3- # downloaded from the SVN repository.
3+ # downloaded from the Svn or Git repository.
44# Usage: From csh, tcsh:
55# $ source ./setenv-svn.sh
66# From most other *nix shells:
1818esapi_classpath=" .:\
1919../../../target/classes:\
2020$( ls ../../../target/esapi-* .jar 2>& - || echo .) :\
21- $( ./findjar.sh log4j-1.2.16 .jar) :\
22- $( ./findjar.sh commons-fileupload-1.2 .jar) :\
23- $( ./findjar.sh servlet-api-2.4 .jar) "
21+ $( ./findjar.sh log4j-1.2.17 .jar) :\
22+ $( ./findjar.sh commons-fileupload-1.3.1 .jar) :\
23+ $( ./findjar.sh servlet-api-2.5 .jar) "
2424
2525esapi_resources=" $( \c d ../../../configuration/esapi >& - 2>& - && pwd) "
2626esapi_resources_test=" $( \c d ../../../src/test/resources/esapi >& - 2>& - && pwd) "
Original file line number Diff line number Diff line change 1313# since the specific version of the library is delivered as part of the
1414# ESAPI zip file. In this manner, we do not have to update this if these
1515# versions change. For the record, at the time of this writing, these were
16- # log4j-1.2.16 .jar, commons-fileupload-1.2. jar, and servlet-api-2.4 .jar.
16+ # log4j-1.2.17 .jar, commons-fileupload-1.3.1. jar, and servlet-api-2.5 .jar.
1717esapi_classpath=" .:\
1818$( ls ../../../esapi* .jar) :\
1919$( ./findjar.sh -start ../../../libs log4j-* .jar) :\
You can’t perform that action at this time.
0 commit comments