DEBUG=0
USERSPACE=0
INSTALLATION=0
+DISABLEROOTCHECK=0
for RAWARG in "${@}"; do
ARG="${RAWARG%%=*}"
case "${ARG}" in
--userspace)
USERSPACE=1
;;
+ --norootcheck)
+ DISABLEROOTCHECK=1
+ ;;
*)
echo "Unknown option '${ARG}'. ${USAGE}." >&2
exit 2
# INSTALLATION update
if [ "${INSTALLATION}" = 1 ]; then
+ # root permissions check
+ if [ "${DISABLEROOTCHECK}" != 1 -a "${EUID}" != 0 ]; then
+ echo "--installation updates should be run with root permissions, or disable this root check with --norootcheck" >&2
+ exit 6
+ fi
JVMARGS=( "${JVMARGS[@]}" "-Duserdefaultappdir=false" )
JVMARGS=( "${JVMARGS[@]}" "-Dnouserdefaultappdir=true" )
JVMARGS=( "${JVMARGS[@]}" "-Dlauncher.appdir=${APPDIR}" )