File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,17 @@ set -o pipefail
77# # assumes that both directories with old and new rpms are provided and filled with relevant rpms
88# # this script attempts parallel installation of old and new set of rpms
99
10+ # # resolve folder of this script, following all symlinks,
11+ # # http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
12+ SCRIPT_SOURCE=" ${BASH_SOURCE[0]} "
13+ while [ -h " $SCRIPT_SOURCE " ]; do # resolve $SOURCE until the file is no longer a symlink
14+ SCRIPT_DIR=" $( cd -P " $( dirname " $SCRIPT_SOURCE " ) " && pwd ) "
15+ SCRIPT_SOURCE=" $( readlink " $SCRIPT_SOURCE " ) "
16+ # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
17+ [[ $SCRIPT_SOURCE != /* ]] && SCRIPT_SOURCE=" $SCRIPT_DIR /$SCRIPT_SOURCE "
18+ done
19+ readonly SCRIPT_DIR=" $( cd -P " $( dirname " $SCRIPT_SOURCE " ) " && pwd ) "
20+
1021function run_java_with_headless {
1122 COMPONENTS_TO_TEST=$2
1223 $JAVA -cp $cp -Djava.awt.headless=$1 MainRunner -test=$COMPONENTS_TO_TEST -jreSdkHeadless=$JREJDK -displayValue=$DISPLAY
@@ -68,7 +79,7 @@ PASSED=0
6879IGNORED=0
6980BODY=" "
7081
71- source RFaT/jtreg-shell-xml.sh
82+ source $SCRIPT_DIR / RFaT/jtreg-shell-xml.sh
7283
7384if [[ -z " ${WORKSPACE} " ]]; then
7485 WORKSPACE=~ /workspace
You can’t perform that action at this time.
0 commit comments