[maemo-developers] Howto detect fremantle in postinst script?

From: Daniel Martin Yerga dyerga at gmail.com
Date: Thu May 14 22:19:52 EEST 2009
Hi.

On Thu, 14 May 2009 20:50:29 +0200
"Till Harbaum / Lists" <lists at harbaum.org> wrote:

> Hi,
> 
> i have been asked to redo my fremantle packages as they call 
> maemo-select-menu-location which isn't present in fremantle 
> anymore. Since i have configure scripts that cope with the
> different maemo versions during compile/build time this is
> the only thing left that isn't automated.
> 
> So what's the preferred method to detect whether the 
> currently running system is a fremantle version? 
> 
> I really don't like the idea of maintaining seperate 
> packages just for this tiny difference.
> 
> I am searching for something like
> 
> if [ "`maemo-version`" != "5" ]; then
>   maemo-select-menu-location
> fi
> 

I am using the following code in my applications:

MAEMO_SELECT_MENU=/usr/bin/maemo-select-menu-location

oldversion="$2"
if [ -z "$oldversion" ]; then
  if [ -f $MAEMO_SELECT_MENU ]
  then 
    maemo-select-menu-location yourdesktopfile.desktop
  fi
fi

It checks for maemo-select-menu-location and it also checks if there is
a previous version it doesn't show the select-menu dialog, i.e. when
users are updating the application.

-- 
Daniel Martin Yerga
http://yerga.net

More information about the maemo-developers mailing list