The little things give you away... A collection of various small helper stuff
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

.make-and-exec 573 B

12345678910
  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}" "$@"