The little things give you away... A collection of various small helper stuff
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

11 linhas
573 B

  1. #!/bin/bash
  2. # Usage: create a file foo.c, make foo a symlink to this script
  3. # When foo is executed, this script silently compiles foo.c into .make-and-exec-binaries/foo and execs that with the arguments provided.
  4. # The compilation goes through make, so later invocations directly exec the binary with little delay.
  5. # To customise the compilation, you can set a CFLAGS env var before running foo.
  6. set -e
  7. name="$(basename "$0")"
  8. cd "$(dirname "$0")"
  9. make --file .make-and-exec-Makefile --silent ".make-and-exec-binaries/${name}"
  10. exec "./.make-and-exec-binaries/${name}" "$@"