igor-petruk / scriptisto

A language-agnostic "shebang interpreter" that enables you to write scripts in compiled languages.
Apache License 2.0
943 stars 24 forks source link

Should a build comment be above or below code in default templates? #17

Closed igor-petruk closed 3 years ago

igor-petruk commented 4 years ago

Pls click to vote

igor-petruk commented 4 years ago

Above:

#!/usr/bin/env scriptisto

// scriptisto-begin
// script_src: main.c
// build_cmd: clang -O2 main.c `pkg-config --libs --cflags glib-2.0` -o ./script
// scriptisto-end

#include <glib.h>
#include <stdio.h>

int main(int argc, char* argv[]) {
  gchar* user = g_getenv("USER");
  printf("Hello, C! Current user: %s\n", user);
  return 0;
}

Below:

#!/usr/bin/env scriptisto

#include <glib.h>
#include <stdio.h>

int main(int argc, char* argv[]) {
  gchar* user = g_getenv("USER");
  printf("Hello, C! Current user: %s\n", user);
  return 0;
}

// scriptisto-begin
// script_src: main.c
// build_cmd: clang -O2 main.c `pkg-config --libs --cflags glib-2.0` -o ./script
// scriptisto-end
igor-petruk commented 3 years ago

I suppose I won't change anything