diff options
author | Jonathan Bauer | 2018-04-10 12:14:46 +0200 |
---|---|---|
committer | Jonathan Bauer | 2018-04-10 12:14:46 +0200 |
commit | 2f598cf3a032592b81b6e2db1fe947577971a5b8 (patch) | |
tree | 5d59112e58885a708f1c909632abf5b81a0765ec /core/modules/slx-issue/module.build | |
parent | Merge branch 'master' of git.openslx.org:openslx-ng/mltk (diff) | |
download | mltk-2f598cf3a032592b81b6e2db1fe947577971a5b8.tar.gz mltk-2f598cf3a032592b81b6e2db1fe947577971a5b8.tar.xz mltk-2f598cf3a032592b81b6e2db1fe947577971a5b8.zip |
[slx-issue] externalize /etc/issue generation
Diffstat (limited to 'core/modules/slx-issue/module.build')
-rw-r--r-- | core/modules/slx-issue/module.build | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/modules/slx-issue/module.build b/core/modules/slx-issue/module.build new file mode 100644 index 00000000..f9ee3f20 --- /dev/null +++ b/core/modules/slx-issue/module.build @@ -0,0 +1,20 @@ +#!/bin/bash +fetch_source() { + : +} + +build() { + : +} + +post_copy() { + # Create issue.template + local DIST=$(lsb_release -sd) + local GITC=$(git rev-parse --short HEAD) + local DATE=$(date "+%Y-%m-%d") + local VERSION=$(echo "bwLehrpool/$DIST $DATE/$GITC" | escape_replace) + mkdir -p "$TARGET_BUILD_DIR/opt/openslx/etc" + sed "s/%version%/$VERSION/g" "$MODULE_DIR/templates/issue.template" > "$TARGET_BUILD_DIR/opt/openslx/etc/issue.template" || perror "Could not create issue template" + +} + |