File tree Expand file tree Collapse file tree 3 files changed +19
-8
lines changed Expand file tree Collapse file tree 3 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,13 @@ PROG=${0##*/}
10
10
# Default starting directory is Maven2 repository under $HOME ...
11
11
starting_dir=$HOME /.m2/repository
12
12
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
+
13
18
case " $1 " in
14
- -start) shift ; starting_dir=" $1 " ; shift ;;
19
+ -start) shift ; starting_dir=" $1 " ; shift ;; # Expected to be right if provided
15
20
-\? ) echo " $USAGE " >&2 ; exit 2 ;;
16
21
-* ) echo " $PROG : Unknown option: $1 ; treating as a jar pattern." >&2 ;;
17
22
esac
25
30
26
31
# echo "Starting location: $starting_dir" # DEBUG
27
32
# 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 1
1
# /bin/bash
2
2
# 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.
4
4
# Usage: From csh, tcsh:
5
5
# $ source ./setenv-svn.sh
6
6
# From most other *nix shells:
18
18
esapi_classpath=" .:\
19
19
../../../target/classes:\
20
20
$( 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) "
24
24
25
25
esapi_resources=" $( \c d ../../../configuration/esapi >& - 2>& - && pwd) "
26
26
esapi_resources_test=" $( \c d ../../../src/test/resources/esapi >& - 2>& - && pwd) "
Original file line number Diff line number Diff line change 13
13
# since the specific version of the library is delivered as part of the
14
14
# ESAPI zip file. In this manner, we do not have to update this if these
15
15
# 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.
17
17
esapi_classpath=" .:\
18
18
$( ls ../../../esapi* .jar) :\
19
19
$( ./findjar.sh -start ../../../libs log4j-* .jar) :\
You can’t perform that action at this time.
0 commit comments