If ( $( Split-Path -Path $target -IsAbsolute ) ) {
$file = Get-Item -Path $target
} Else {
-# symbolic link is relative: combine previous link parent dir with the link target and resolve
+ # symbolic link is relative: combine previous link parent dir with the link target and resolve
$file = Get-Item -Path ( Join-Path -Path ( Split-Path -Path $prevfile -Parent ) -ChildPath $target -Resolve )
}
}
declare -a ARGS=("${@}")
+ISMACOS=0
+if [ "$( uname -s )" = "Darwin" ]; then
+ ISMACOS=1
+fi
+
+DEBUG=0
+USERSPACE=0
+INSTALLATION=0
+for RAWARG in "${@}"; do
+ ARG="${RAWARG%%=*}"
+ case "${ARG}" in
+ --debug)
+ DEBUG=1
+ ;;
+ --installation)
+ INSTALLATION=1
+ ;;
+ --userspace)
+ USERSPACE=1
+ ;;
+ *)
+ echo "Unknown option '${ARG}'. Please use either --installation or --userspace." >&2
+ exit 2
+ esac
+done
+
# this whole next part is because there's no readlink -f in Darwin
function readlinkf() {
FINDFILE="$1"
echo "${FILE}"
}
-ISMACOS=0
-if [ "$( uname -s )" = "Darwin" ]; then
- ISMACOS=1
-fi
-
-DEBUG=0
-USERSPACE=0
-INSTALLATION=0
-for RAWARG in "${@}"; do
- ARG="${RAWARG%%=*}"
- case "${ARG}" in
- --debug)
- DEBUG=1
- ;;
- --installation)
- INSTALLATION=1
- ;;
- --userspace)
- USERSPACE=1
- ;;
- *)
- echo "Unkown option '${ARG}'" >&2
- exit 2
- esac
-done
-
# args for the JVM
declare -a JVMARGS=()
# change paths for Cygwin or WSL
if [ "${ISMACOS}" != 1 ]; then # older macos doesn't like uname -o, best to avoid
if [ "$(uname -o)" = "Cygwin" ]; then
- # CYGWIN
+ # CYGWIN
GDL_CLASSPATH=$(cygpath -pw "${GDL_CLASSPATH}")
+ GDC_CLASSPATH=$(cygpath -pw "${GDC_CLASSPATH}")
elif uname -r | grep -i microsoft | grep -i wsl >/dev/null; then
- # WSL
+ # WSL
GDL_CLASSPATH=""
for JARPATH in "${GDL_JARPATHS[@]}"; do
[ -n "${GDL_CLASSPATH}" ] && GDL_CLASSPATH="${GDL_CLASSPATH};"
GDL_CLASSPATH="${GDL_CLASSPATH}$(wslpath -aw "${JARPATH}")"
done
+ GDC_CLASSPATH=""
+ for JARPATH in "${GDC_JARPATHS[@]}"; do
+ [ -n "${GDC_CLASSPATH}" ] && GDC_CLASSPATH="${GDC_CLASSPATH};"
+ GDC_CLASSPATH="${GDC_CLASSPATH}$(wslpath -aw "${JARPATH}")"
+ done
JAVA="${JAVA}.exe"
SYSJAVA="java.exe"
fi