summaryrefslogtreecommitdiffstats
path: root/builder/modules.d/slx-tools
diff options
context:
space:
mode:
authorJonathan Bauer2019-07-16 10:36:33 +0200
committerJonathan Bauer2019-07-16 10:36:33 +0200
commitbc88b84d2d3b7776b58c6c31ddfec0169dfa5cd6 (patch)
tree8cac8c908833d115a4f4c280548a727d1890f626 /builder/modules.d/slx-tools
parent[slx-partitioner] do not wipefs on swap by default (diff)
downloadsystemd-init-bc88b84d2d3b7776b58c6c31ddfec0169dfa5cd6.tar.gz
systemd-init-bc88b84d2d3b7776b58c6c31ddfec0169dfa5cd6.tar.xz
systemd-init-bc88b84d2d3b7776b58c6c31ddfec0169dfa5cd6.zip
[slx-tools] add module for slx-tools
Diffstat (limited to 'builder/modules.d/slx-tools')
-rw-r--r--builder/modules.d/slx-tools/module-setup.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/builder/modules.d/slx-tools/module-setup.sh b/builder/modules.d/slx-tools/module-setup.sh
new file mode 100644
index 00000000..344bd550
--- /dev/null
+++ b/builder/modules.d/slx-tools/module-setup.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+build() {
+ # clone if not cloned yet
+ if [ ! -d "${moddir}/src" ]; then
+ git clone --depth 1 "git://git.openslx.org/openslx-ng/slx-tools" "${moddir}/src"
+ fi
+ cd "${moddir}/src"
+ bash make.sh /usr/share/slx-tools
+ cd - &>/dev/null
+}
+check() {
+ if [ ! -x "${moddir}/src/slx-tools" ]; then
+ build || derror "Failed to build slx-tools"
+ return 1
+ fi
+ return 255
+}
+
+depends() {
+ :
+}
+
+install() {
+ inst "${moddir}/src/slx-tools" "/usr/bin/slx-tools"
+ mkdir -p "${initdir}/usr/share/slx-tools"
+ cp -r "${moddir}/src/modules" "${initdir}/usr/share/slx-tools"
+}