maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Trouble running a script (https://talk.maemo.org/showthread.php?t=39319)

stanigator 2010-01-05 10:09

Trouble running a script
 
I want to have these two files being able to be run on my N810 to sync my todo list with the svn repository:

To retrieve updated content:
Code:

#!bin/bash

WORKING="/home/user/.gpe/"
SVNPATH="/media/mmc1/gpe/"

cd
ls -la
ls -d .*
ls -d {.*,*}
echo .*
echo {.*,*}
cd $SVNPATH
cp calendar categories contacts todo $WORKING

To commit content
Code:

#!bin/bash

WORKING="/home/user/.gpe/"
SVNPATH="/media/mmc1/gpe/"

cd
ls -la
ls -d .*
ls -d {.*,*}
echo .*
echo {.*,*}
cd $WORKING
cp calendar categories contacts todo $SVNPATH
echo $SVNPATH
svn commit

However, I am having a lot of trouble getting this working. I am not seeing any verbose output of those two scripts. It would be great to hear some suggestions. Thanks.

TA-t3 2010-01-05 11:18

Re: Trouble running a script
 
Maybe you don't have bash installed.

In any case you should never ever use #!/bin/bash for sh-compatible scripts. There are only very rare cases where you really need a bash-specific feature. For all other sh scripts (if you've got bash or not) you should use
#!/bin/sh

stanigator 2010-01-05 11:19

Re: Trouble running a script
 
I did have bash installed. I tried #!/bin/sh and #!/bin/ash and still didn't work.

TA-t3 2010-01-05 11:46

Re: Trouble running a script
 
A simple version (just doing ls -ld .*) works fine for me. Do you have the 'x' bit set? Try running the script with
sh -x name-of-script
which will list every line of the script as it executes.


All times are GMT. The time now is 02:31.

vBulletin® Version 3.8.8