[enh] There should be a build script
This commit is contained in:
parent
d296e615e9
commit
dddd30aa96
20
build.sh
Executable file
20
build.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
PLUGINS=$( grep -hv "^#!" plugins-enabled/* )
|
||||
|
||||
BUILD_FILE=build/changelog
|
||||
mkdir -p build
|
||||
[[ -f $BUILD_FILE ]] && rm $BUILD_FILE
|
||||
cp changelog.sh $BUILD_FILE
|
||||
|
||||
PLUGIN_LINE=$(awk '/%PLUGIN%/ { print NR; exit}' $BUILD_FILE )
|
||||
sed -i "${PLUGIN_LINE}r /dev/stdin" $BUILD_FILE <<< "$PLUGINS"
|
||||
|
||||
[[ -f config.sh ]] && {
|
||||
|
||||
CONFIG_LINE=$(awk '/%CONFIG%/ { print NR; exit}' $BUILD_FILE )
|
||||
sed -i "${CONFIG_LINE}r config.sh" $BUILD_FILE
|
||||
|
||||
}
|
||||
|
||||
echo "Successfuly built $BUILD_FILE."
|
Loading…
Reference in New Issue
Block a user