Contents of /branches/ports/maemo/debian/postinst

Parent Directory Parent Directory | Revision Log Revision Log


Revision 183 - (show annotations)
Tue Jun 23 19:37:02 2009 UTC (14 years, 10 months ago) by harbaum
File size: 930 byte(s)
Better path handling
1 #! /bin/sh
2
3 # Do we need to run this with -f ? The clock might be wrong,
4 # but forcing it slows the install...
5 gtk-update-icon-cache -f /usr/share/icons/hicolor
6
7 oldversion="$2"
8 if [ -z "$oldversion" ]; then
9 if [ -f /usr/bin/maemo-select-menu-location ]; then
10 maemo-select-menu-location osm2go.desktop
11 fi
12 fi
13
14 # determine path to use
15 if [ "$INTERNAL_MMC_MOUNTPOINT" != "" ]; then
16 MMC_PATH=$INTERNAL_MMC_MOUNTPOINT
17 elif [ "$HOME" != "" ]; then
18 MMC_PATH=$HOME
19 else
20 MMC_PATH=/tmp
21 fi
22
23 # hide directory if we are working within a users home dir
24 if [ "`echo $MMC_PATH | cut -d / -f-2`" == "/home" ]; then
25 MMC_PATH=$MMC_PATH/.osm2go
26 else
27 MMC_PATH=$MMC_PATH/osm2go
28 fi
29
30 echo "Using data location at $MMC_PATH"
31
32 if [ -d $MMC_PATH ]; then
33 echo "$MMC_PATH already exists, doing nothing."
34 else
35 echo "$MMC_PATH doesn't exist yet. Installing demo project."
36 mkdir $MMC_PATH
37 mv /usr/share/osm2go/demo $MMC_PATH
38 fi
39
40 exit 0