# HG changeset patch # User Andre Heinecke # Date 1410357291 -7200 # Node ID febd195c0301ffbf69fc746b67b000a28f88d2bc # Parent 5cf648c233d2f8115301718c362a2241154ad68b (issue109) Add summary after installation. diff -r 5cf648c233d2 -r febd195c0301 packaging/linux-installer.inc.in --- a/packaging/linux-installer.inc.in Wed Sep 10 11:52:55 2014 +0200 +++ b/packaging/linux-installer.inc.in Wed Sep 10 15:54:51 2014 +0200 @@ -45,6 +45,8 @@ FORCE=0 SYSINST=0 DEINSTALL=0 +UPDATE=0 +SHOWAFTERUPDATE=0 BINNAMES="###BINNAMES###" ICONNAME="###ICONNAME###" HELPNAMES="###HELPNAMES###" @@ -154,7 +156,7 @@ parse_args() { OPTS=`getopt \ - -l deinstall,force,help,prefix:,system,version \ + -l deinstall,update,show-after-update,force,help,prefix:,system,version \ -o d,f,p:,s -n "$ME" -- "$@"` [ $? -eq 0 ] || usage 23 @@ -178,6 +180,14 @@ DEINSTALL=1 shift 1 ;; + --update) + UPDATE=1 + shift 1 + ;; + --show-after-update) + SHOWAFTERUPDATE=1 + shift 1 + ;; --help) usage 0 ;; @@ -194,6 +204,11 @@ init_vars() { + if [ -n "${SUDO_USER-}" ] ; then + # Default to system wide installation when running with sudo + SYSINST=1 + fi + if [ $SYSINST -eq 1 ] ; then inst_default_prefix="$SYSDEFAULT_PREFIX" instcfg_path="${SYSCFGPATH}" @@ -222,6 +237,44 @@ HOST_ARCH=$(uname -m) } +finished() +{ + echo + echo "#################################################################################" + if [ $SYSINST -eq 1 ]; then + getxt "System wide installation successful.\n" + else + getxt "Single user installation successful.\n" + fi + getxt "TrustBridge has been installed to: '%s'\n\n" "${instcfg[PREFIX]}" + + if [ $SYSINST -eq 1 ]; then + getxt "If you do not want to change the certificates of other users\n" + getxt "uninstall it with:\n" + echo " 'sudo $0 -d'" + getxt "And install it again without sudo:\n" + echo " $0" + else + getxt "If you want to change the certificates of all users\n" + getxt "uninstall it with:\n" + echo " '$0 -d'" + getxt "And install it again using sudo:\n" + echo " sudo $0" + fi + echo "#################################################################################" + getxt "Press enter to launch '%s'\n" "${instcfg[PREFIX]}/bin/trustbridge" + if [ $UPDATE -eq 0 ]; then + read + "${instcfg[PREFIX]}/bin/trustbridge" & + else + if [ $SHOWAFTERUPDATE -eq 0 ]; then + "${instcfg[PREFIX]}/bin/trustbridge" --tray & + else + "${instcfg[PREFIX]}/bin/trustbridge" & + fi + fi +} + cleanup() { getxt "Cleaning up temporary stuff ...\n" @@ -629,6 +682,8 @@ getxt "Writing installation configuration to: %s ...\n" "$instcfg_file" write_instcfg +finished + # cleanup # is called implicitly at exit via trap... exit 0 diff -r 5cf648c233d2 -r febd195c0301 packaging/linux-installer.l10n-de --- a/packaging/linux-installer.l10n-de Wed Sep 10 11:52:55 2014 +0200 +++ b/packaging/linux-installer.l10n-de Wed Sep 10 15:54:51 2014 +0200 @@ -56,4 +56,13 @@ ["This installer is for 64 bit systems.\n"]="Dieses Installationspaket ist für 64 bit Systeme.\n" ["This installer is for 32 bit systems.\n"]="Dieses Installationspaket ist für 32 bit Systeme.\n" ["Really install TrustBridge for '%s' systems? [y/n]\n"]="Soll TrustBridge für '%s' wirklich installiert werden? [j/n]\n" + ["System wide installation successful.\n"]="Systemweite Installation erfolgreich.\n" + ["Single user installation successful.\n"]="Einzelnutzer Installation erfolgreich.\n" + ["TrustBridge has been installed to: '%s'\n\n"]="TrustBridge wurde nach '%s' installiert\n\n" + ["If you do not want to change the certificates of other users\n"]="Wenn Sie nicht die Zertifikate aller Nutzer auf dem System ändern möchten\n" + ["uninstall it with:\n"]="deinstallieren Sie es bitte wieder mit:\n" + ["And install it again without sudo:\n"]="Und installieren es erneut ohne sudo:\n" + ["If you want to change the certificates of all users\n"]="Wenn Sie die Zertifikate aller Nutzer auf diesem System ändern möchten\n" + ["And install it again using sudo:\n"]="Und installieren es erneut mittels sudo:\n" + ["Press enter to launch '%s'\n"]="Drücken Sie enter um '%s' auszuführen\n" )