Rockbox General > Rockbox General Discussion

A question about rockbox and terminal scripts

(1/2) > >>

momo_101:
Hi everyone! I was wondering if someone could help me revise a Bash script that I wrote for getting the latest SVN update of rockbox, building it, and then unzipping it to my player. I was wondering if it's possible to already tell configure what device I have and that I want it to do a normal build. I would also like to make it so my computer runs the script everytime my ipod is mounted, but not someone e;se's ipod (like seeing if a file exists where it mounts as a way to check if it's MY iPod in). I only have a little knowledge of programming/scripting so I'm sorry if it's been done, or if there is a better way to do it.

I use a Mac using OSX 10.4.10
My device is an iPod Color/Photo which is already the correct format
My iPod mounts to the same place in the file browser (/volumes/ipod/) everytime

if there's a way to do what i posted in the mess of thoughts above, could somebody post a revise/fixed version of my script?

I have uploaded it as ipod_rockbox.txt

[attachment deleted by admin for age]

bluebrother:
well, this won't work that way.
1. the configure script wants some user input. Just calling it won't work. OTOH, you usually don't need to reconfigure once you ran configure (except sometimes when there are changes to the configure script). For example, I have a small script that builds all manuals, and I don't run configure first -- I did that when initially setting up the build folders.
2. you don't need to cd to the folder before running make as make can do this for you. Just use "make -C build all zip"
3. you don't need to move the zip file to the Ipod (you can do so, of course). Just provide unzip the path where to extract the files, i.e. "unzip -d /volumes/ipod/ rockbox.zip"
4. to improve the script you might want to verify if the Ipod is actually mounted before extracting the build.

momo_101:
How would I be able to make a way so the computer will verify that the iPod is connected? I know that Bash can do "if" statements, but i'm not really sure how. That for the other help though. ^^

bluebrother:
well, you could check for some files that are present in a Rockbox install. You could also use ipodpatcher to detect the ipod -- which will only work if you have root permissions though.

And for the if statements, I recomment "man if".

momo_101:
I looked into "man if" and i only got some OSX stuff saying it was a builtin command and no usage. DO you know of any good sites that could explain it?

Navigation

[0] Message Index

[#] Next page

Go to full version