Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  A question about rockbox and terminal scripts
« previous next »
  • Print
Pages: [1]

Author Topic: A question about rockbox and terminal scripts  (Read 2662 times)

Offline momo_101

  • Member
  • *
  • Posts: 12
A question about rockbox and terminal scripts
« on: July 06, 2007, 01:51:13 AM »
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]
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: A question about rockbox and terminal scripts
« Reply #1 on: July 06, 2007, 05:51:52 AM »
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.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline momo_101

  • Member
  • *
  • Posts: 12
Re: A question about rockbox and terminal scripts
« Reply #2 on: July 06, 2007, 10:26:46 AM »
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. ^^
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: A question about rockbox and terminal scripts
« Reply #3 on: July 06, 2007, 10:29:25 AM »
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".
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline momo_101

  • Member
  • *
  • Posts: 12
Re: A question about rockbox and terminal scripts
« Reply #4 on: July 06, 2007, 12:55:48 PM »
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?
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: A question about rockbox and terminal scripts
« Reply #5 on: July 06, 2007, 03:27:39 PM »
Quote from: momo_101 on July 06, 2007, 12:55:48 PM
I looked into "man if" and i only got some OSX stuff saying it was a builtin command
Argh. Mixed something up here ... ask google about websites. If you want a book, I can recommend "Linux in a nutshell" which covers a lot of standard command line stuff. At least the basics should apply to the mac too.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline momo_101

  • Member
  • *
  • Posts: 12
Re: A question about rockbox and terminal scripts
« Reply #6 on: July 06, 2007, 10:15:23 PM »
OK, thanks! If I actually had money, I'd probably buy the book because I like using Linux too, but I guess I'll try google out. If I can get this thing completely automated, it'll be a lot easier than having to kick my brother off the computer. lol
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  A question about rockbox and terminal scripts
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.064 seconds with 15 queries.