pnacl: make conditionnal file creation a "one liner" to fix indentation
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 2 May 2014 18:42:15 +0000 (14:42 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Mon, 12 May 2014 14:10:15 +0000 (10:10 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/pnacl_platform.nit

index e26747b..e05c5c6 100644 (file)
@@ -117,8 +117,8 @@ all: ../../{{{outname}}}/{{{app_name}}}.pexe
                ### generate the minimal index.html
                if not outname.file_exists then outname.mkdir
                file = "{outname}/index.html"
-               if not file.file_exists then
-               """
+
+               if not file.file_exists then """
 <!DOCTYPE html>
 <html>
   <!--
@@ -161,14 +161,12 @@ all: ../../{{{outname}}}/{{{app_name}}}.pexe
 </body>
 </html>
                """.write_to_file(file)
-               end
 
                ### generate pnacl_js.js in a folder named 'js'
                dir = "{outname}/js/"
                if not dir.file_exists then dir.mkdir
                file = "{dir}/pnacl_js.js"
-               if not file.file_exists then
-               """
+               if not file.file_exists then """
 // This file was generated by Nit, any modification will be lost.
 
 {{{app_name}}}Module = null;  // Global application object.
@@ -219,7 +217,6 @@ function updateStatus(opt_message) {
        }
 }
                """.write_to_file(file)
-               end
 
                ### generate the manifest file : app_name.nmf
                # used to point the HTML to the Native Client module