From 6f96a1d135e26020061bade62aae0e9d76603867 Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Wed, 9 Nov 2011 08:34:08 -0500 Subject: [PATCH] build: Generate ocarina.sh during instatll I was doing this whenever the Command() class was constructed, instead I only want to do this when it's run. --- Sconstruct | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sconstruct b/Sconstruct index 36abf203..7095700d 100644 --- a/Sconstruct +++ b/Sconstruct @@ -47,13 +47,13 @@ images = lib + "/images" env.Install(lib, ocarina) env.Alias("install", [lib, images, bin]) env.Command(images, "./images/", [Copy(images, "./images")]) -def ocarina_sh(): +def ocarina_sh(target, source, env): f = open("ocarina.sh", "w") f.write("#!/bin/bash\n") f.write(PREFIX + "/lib/ocarina/ocarina.bin \"$*\"\n") f.close() - return "./ocarina.sh" -env.Command(bin, ocarina_sh(), [Move(bin, "$SOURCE"), Chmod(bin, 0755)]) + #return "./ocarina.sh" +env.Command(bin, None, [ocarina_sh, Move(bin, "ocarina.sh"), Chmod(bin, 0755)]) # Clean up the build directory Clean(ocarina, ["include/version.h"])