Pandora PND startscript


dbluelle

Still Fresh
Joined
Nov 22, 2011
Messages
39
Hi,


I've generated a startscript for my pnd following the PND cookbook from the wiki (see http://pandorawiki.org/PND_Cookbook ).


However I don't understand how the current directory is handled.


As stated in the wiki, calling `pwd` will get the appdata entry for the application,


but checking for an existing directory inside the appdata folder doesn't seem to work :(


I also don't understand how copying files from the mounted pnd to the appdata folder works.


The wiki states that I only have to "cp default.conf app.conf", but how does the script know that the first parameter is from


the mounted pnd and the second parameter is in the appdata folder?


This copying doesn't seem to work for directories, either.


So here's my current start script:



Code:
#!/bin/sh


export HOME=`pwd`

if [ ! -d `pwd`/data ] ; then

    mkdir `pwd`/data

    cp default_data/* `pwd`/data/

fi

export LD_LIBRARY_PATH=`pwd`:LD_LIBRARY_PATH

...

I don't have much experience in bash scripting, so maybe there is something obvious I missed :rolleyes:


Thanks in advance,


dbluelle
 

_wb_

Microbe
Staff member
Joined
Apr 5, 2012
Messages
5,390
Age
40
Location
Brussels, Belgium
Try removing the `pwd` and replacing it with just .


Also, you don't need to set HOME yourself, this will be done automatically.
 
Top