Diff of /branches/ports/maemo/debian/postinst

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 306 by harbaum, Thu Jul 16 19:56:23 2009 UTC revision 307 by harbaum, Wed Oct 14 07:23:45 2009 UTC
# Line 11  if [ -z "$oldversion" ]; then Line 11  if [ -z "$oldversion" ]; then
11    fi    fi
12  fi  fi
13    
14  # there are two problems with the following approach:  # determine path to use. Since the environment variables
15  # a) diablo/chinook units don't have these env variables  # (INTERNAL_MMC_MOUNTPOINT etc) are too unreliable, we
16  #    accessible to the app installer. We thus check for  # search for mountpoints ourselves
17  #    /media/mmc2 explicitely but avoid this on scratchbox  if [ "`mount | grep /home/user/MyDocs`" != "" ]; then
18  # b) the installation may be done by the root user which    echo "MMC-PATH: mount /home/user/MyDocs"
19  #    would result in an installation in roots home dir    MMC_PATH=/home/user/MyDocs
20  #    if everything else fails  elif [ "`mount | grep /media/mmc2`" != "" ]; then
21      echo "MMC-PATH: mount /media/mmc2"
 # determine path to use  
 if [ "$INTERNAL_MMC_MOUNTPOINT" != "" ]; then  
   echo "MMC-PATH: INTERNAL_MMC_MOUNTPOINT env"  
   MMC_PATH=$INTERNAL_MMC_MOUNTPOINT  
 elif [  "$_SBOX_DIR" == "" ] && [ -d /media/mmc2 ]; then  
   echo "MMC-PATH: non-sbox explicit /media/mmc2"  
22    MMC_PATH=/media/mmc2    MMC_PATH=/media/mmc2
23  elif [ "$HOME" != "" ]; then  elif [ "$HOME" != "" ]; then
24    echo "MMC-PATH: HOME env"    echo "MMC-PATH: HOME env"
# Line 48  if [ -d $MMC_PATH ]; then Line 42  if [ -d $MMC_PATH ]; then
42  else  else
43    echo "$MMC_PATH doesn't exist yet. Installing demo project."    echo "$MMC_PATH doesn't exist yet. Installing demo project."
44    mkdir $MMC_PATH    mkdir $MMC_PATH
45    mv /usr/share/osm2go/demo $MMC_PATH    if [ -d /usr/share/osm2go/demo ]; then
46        mv /usr/share/osm2go/demo $MMC_PATH
47      elif [ -d /opt/osm2go/demo ]; then
48        mv /opt/osm2go/demo $MMC_PATH
49      else
50        echo "Cannot find demo project!"
51      fi
52  fi  fi
53    
54  exit 0  exit 0

Legend:
Removed from v.306  
changed lines
  Added in v.307