Ignore:
Timestamp:
Aug 10, 2011, 6:50:54 PM (9 years ago)
Author:
goncalo.pinheira
Message:

CMCE: added current version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • internals/2011/cmce/trunk/uck/libraries/customization-profiles/localized_cd/customize

    r4876 r5005  
    4141}
    4242
    43 function run_package_manager()
    44 {
    45         echo "Starting package application..."
    46        
    47         PACKAGE_APP=`which adept`
    48         PACKAGE_APP_OPTIONS=(--caption "UCK Package Manager")
    49         if [ "$PACKAGE_APP" = "" ]; then
    50                 PACKAGE_APP=`which adept_manager`
    51         fi
    52         if [ "$PACKAGE_APP" = "" ]; then
    53                 PACKAGE_APP=`which kpackagekit`
    54         fi
    55         if [ "$PACKAGE_APP" = "" ]; then
    56                 PACKAGE_APP=`which synaptic`
    57                 PACKAGE_APP_OPTIONS=(-t "UCK Package manager")
    58         fi
    59        
    60         if [ "$PACKAGE_APP" = "" ]; then
    61                 dialog_msgbox "Failure" "Unable to find any package manager application"
    62         else
    63                 $PACKAGE_APP "${PACKAGE_APP_OPTIONS[@]}"
    64                 RESULT=$?
    65        
    66                 if [ $RESULT -ne 0 ]; then
    67                         dialog_msgbox "Failure" "Running package application $PACKAGE_APP failed, error=$RESULT"
    68                 fi
    69         fi
    70 }
    71 
    7243function run_console()
    7344{
     
    10778}
    10879
    109 SCRIPT_DIR=`dirname "$0"`
    110 . "$SCRIPT_DIR/gui.sh"
    11180
    11281# Inherit environment
     
    170139
    171140if [ "$RUN_MANUAL_CUSTOMIZATIONS" = "yes" ] ; then
    172         while true ; do
    173                 CHOICE_PACKAGE_MANAGER="Run package manager"
    174                 CHOICE_CONSOLE="Run console application"
    175                 CHOICE_EXIT="Continue building"
    176                 CHOICE=`dialog_menu "Please choose customization action" "$CHOICE_PACKAGE_MANAGER" "$CHOICE_CONSOLE" "$CHOICE_EXIT"`
    177                 RESULT=$?
    178 
    179                 if [ $RESULT -ne 0 ] ; then
    180                         failure "Script cancelled by user"
    181                 fi
    182                 #workaround for KDE bug (https://bugs.kde.org/show_bug.cgi?id=139025)
    183                 CHOICE=`echo "$CHOICE" | grep -v -i kwrited | tail -n1`
    184 
    185                 echo "CHOICE='$CHOICE'"
    186 
    187                 if [ "$CHOICE" = "$CHOICE_EXIT" ] ; then
    188                         break
    189                 elif [ "$CHOICE" = "$CHOICE_PACKAGE_MANAGER" ] ; then
    190                         run_package_manager
    191                 elif [ "$CHOICE" = "$CHOICE_CONSOLE" ] ; then
    192                         run_console
    193                 fi
    194         done
     141        eval `dbus-launch --sh-syntax --exit-with-session 2>/dev/null`
     142        apt-get update || apt-get update
     143        apt-get install xvfb x11vnc
     144        export DISPLAY=:5
     145        Xvfb :1 -screen 0 1024x768x16 &
     146        x11vnc -display :1 -bg -nopw -listen localhost -xkb
     147        gnome-session
     148        apt-get purge xvfb x11vnc
    195149fi
    196150
Note: See TracChangeset for help on using the changeset viewer.