diff --git a/x11docker b/x11docker index 54c5e46..62f2698 100755 --- a/x11docker +++ b/x11docker @@ -12,6 +12,7 @@ # More documentation at: https://github.com/mviereck/x11docker Version="7.5.0-beta-1" +Packagedversion="no" # Set to "yes" if you want to package x11docker. This disables installation options. # --enforce-i: Enforce running in interactive mode to allow commands tty and weston-launch in special setups. (deprecated) grep -q -- "--enforce-i" <<< "$*" && case $- in @@ -365,7 +366,17 @@ Verbosity options: -v, --verbose Be verbose. Output of x11docker.log on stderr. -V Be verbose with colored output. -Installation options and cleanup (need root permissions): +Cleanup options (need root permissions): + --cleanup Clean up orphaned containers and cache files. Those + can remain if x11docker still runs on system shutdown. + Terminates currently running x11docker containers, too. + Regards (only) option --backend=BACKEND." + + case "$Packagedversion" in + yes) ;; + *) + echo " +Installation options (need root permissions): --install Install x11docker from current folder. Useful to install from an extracted zip file. --update [=diff] Download and install latest release from github. @@ -374,14 +385,13 @@ Installation options and cleanup (need root permissions): installed and new version without installing it. --remove Remove x11docker from your system. Includes --cleanup. Preserves ~/.local/share/x11docker from option --home. - --cleanup Clean up orphaned containers and cache files. Those - can remain if x11docker still runs on system shutdown. - Terminates currently running x11docker containers, too. - Regards (only) option --backend=BACKEND. --update, --update-master and --remove regard a possible custom installation path different from default /usr/bin directory. -Additional options are disregarded. +Additional options are disregarded." + ;; + esac + echo " Exit codes: 0: Success 64: x11docker error @@ -11313,23 +11323,34 @@ main() { setup_verbosity # create [and show] summary logfile # --verbose check_containeruser # unprivileged user in container # --user check_containerhomebasedir # check base dir for --home and possible rootfs # --homebasedir - check_backend # --backend # Special x11docker jobs [ "$Createlauncher" ] && { create_launcher # --launcher: Create application launcher icon on desktop finish } - [ "$Cleanup" ] && { # --cleanup: Clean up cache and orphaned x11docker containers - check_optionset "--cleanup" "$(grep -v -E -- '--cleanup|--backend' <<< "$Optionsetall")" ||: - cleanup - finish - } [ "$Installermode" ] && { # --install, --update, --update-master, --remove + case "$Packagedversion" in + yes) + case "$Installermode" in + --install|--update|--update-master|--remove) + error "Options --install|--update|--update-master|--remove + are not supported in packaged versions of x11docker. + Please use your package manager instead." + ;; + esac + ;; + esac check_optionset "$Installermode" "$(grep -v -E -- '--install|--update|--update-master|--remove' <<< "$Optionsetall")" ||: installer "$Installermode" finish } + check_backend # --backend + [ "$Cleanup" ] && { # --cleanup: Clean up cache and orphaned x11docker containers + check_optionset "--cleanup" "$(grep -v -E -- '--cleanup|--backend' <<< "$Optionsetall")" ||: + cleanup + finish + } [ "$Buildimage" ] && { # --build: Build image from x11docker repository check_optionset "--build" "$(grep -v -E -- '--build|--backend' <<< "$Optionsetall")" ||: buildimage "$Imagename"