summaryrefslogtreecommitdiffstats
path: root/core/modules/slx-issue/module.build
diff options
context:
space:
mode:
authorJonathan Bauer2018-04-10 12:14:46 +0200
committerJonathan Bauer2018-04-10 12:14:46 +0200
commit2f598cf3a032592b81b6e2db1fe947577971a5b8 (patch)
tree5d59112e58885a708f1c909632abf5b81a0765ec /core/modules/slx-issue/module.build
parentMerge branch 'master' of git.openslx.org:openslx-ng/mltk (diff)
downloadmltk-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.build20
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"
+
+}
+