mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-15 20:12:04 +01:00
repl: cd into PROJECT_ROOT
This commit is contained in:
parent
1241d32610
commit
2d398b8dcf
1 changed files with 5 additions and 1 deletions
6
repl
6
repl
|
@ -3,6 +3,7 @@ set -e
|
||||||
set -u
|
set -u
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
|
||||||
while getopts d OPTION "$@"; do
|
while getopts d OPTION "$@"; do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
d)
|
d)
|
||||||
|
@ -11,6 +12,9 @@ while getopts d OPTION "$@"; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
PROJECT_ROOT=$(dirname "${BASH_SOURCE[0]}")
|
||||||
|
cd "${PROJECT_ROOT}"
|
||||||
|
|
||||||
echo "Compiling and computing classpath (May take a while)"
|
echo "Compiling and computing classpath (May take a while)"
|
||||||
# Sadly even with the --quiet option Gradle (or some component of)
|
# Sadly even with the --quiet option Gradle (or some component of)
|
||||||
# will print the number of warnings/errors to stdout if there are
|
# will print the number of warnings/errors to stdout if there are
|
||||||
|
@ -19,7 +23,7 @@ echo "Compiling and computing classpath (May take a while)"
|
||||||
# /smack/smack-repl/build/classes/main:/smack/smack-repl/build/
|
# /smack/smack-repl/build/classes/main:/smack/smack-repl/build/
|
||||||
# resources/main:/smack/smack-tcp/build/libs/smack-tcp-4.2.0-alpha4-SNAPSHOT.jar
|
# resources/main:/smack/smack-tcp/build/libs/smack-tcp-4.2.0-alpha4-SNAPSHOT.jar
|
||||||
# So perform a "tail -n1" on the output of gradle
|
# So perform a "tail -n1" on the output of gradle
|
||||||
declare -r GRADLE_CLASSPATH="$(gradle :smack-repl:printClasspath --quiet |\
|
GRADLE_CLASSPATH="$(gradle :smack-repl:printClasspath --quiet |\
|
||||||
tail -n1)"
|
tail -n1)"
|
||||||
echo "Finished, starting REPL"
|
echo "Finished, starting REPL"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue