diff options
author | makefu <root@pigstarter.de> | 2013-12-17 09:29:24 +0100 |
---|---|---|
committer | makefu <root@pigstarter.de> | 2013-12-17 09:29:24 +0100 |
commit | e8a3666d702fc099baba8b0b41ff414a8571fd55 (patch) | |
tree | 2f72626742ee8213a5fcf57803818b7aa64e5cc0 /ship/build | |
parent | f5c8830887fc238ed1d1075e1459dadc44f5ad4d (diff) | |
parent | abf03f260a3d4b3b1b62c98ede3014b724658e1c (diff) |
Merge branch 'master' of https://github.com/krebscode/painload
Diffstat (limited to 'ship/build')
-rwxr-xr-x | ship/build | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -40,12 +40,22 @@ EOF fi } +## usage: #@strict -> build_strict_mode \1 +build_strict_mode() { cat<<EOF +$1a\\ +set -euf\\ +set -o posix || : +EOF +} + ## usage: #@info -> build_info \1 -build_info() { cat<<EOF +build_info() { + gitinfo=$(git describe --always --dirty --abbrev=0 2>/dev/null || :) +cat<<EOF $1a\\ # this file was generated by //ship/build\\ # build date: $(date -u --rfc-3339=s)\\ -# git describe: $(git describe --always --dirty --abbrev=0) +# git describe: ${gitinfo:-not under version control} EOF } @@ -177,6 +187,8 @@ buildcache_add() { echo "$1" >> "$buildcache" } + + ### ### main invocation ### |