Blender SVN Update and Build (Unix Script)

I’ve been trying to write a script that updates from the svn and if it updates any files from the svn it compiles with scons, and if scons fails because of build errors its runs scons clean then attempts to run scons again.

Just checking to see if anyone knows how to pull this off. I’ve gotten it kinda working but just thought i’d see if anyone could lend a hand. I’m on ubuntu linux by the way just fyi.

I haven’t yet written a script for this on Linux, but under windows, I have several scripts:
b-up (update the source)
b-make-j1 (build blender with 1 processor)
b-make-j2 (build blender with 2 processors)
b-rep (strips, renames, and moves the freshly compiled binary)
b-clean (clean the build directory).
I guess what I’m trying to illustrate is that having separate scripts is okay. Besides, I like to keep the source updated at all times, but I don’t need to compile it all the time. I usually want to “install” the new binary, but I don’t always want to clean the build directory.

Yeah i understand where your coming from. Thats how i basically have it set up now, but just seeing if i could stream line it a little more. It doesn’t take long to compile every update as long as i don’t clean the build directory like you said.

you could always do something simple like this:
(assuming scons returns 0 on error as it should)


svn up && (scons || (scons clean && scons))

That will try to build even if there are no changes, but it should be fast in those case anyway.

Martin