mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
scripts: add script to create addons
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
ebbd9da3da
commit
1c0befea49
29
scripts/create_addon
Executable file
29
scripts/create_addon
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. config/options
|
||||||
|
|
||||||
|
PKG_DIR=`find $PACKAGES -type d -name $1`
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "usage: $0 package_name"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f $PKG_DIR/arch ]; then
|
||||||
|
grep -q "$TARGET_ARCH" "$PKG_DIR/arch" || exit 0
|
||||||
|
grep -q "\-$TARGET_ARCH" "$PKG_DIR/arch" && exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f $PKG_DIR/platform ]; then
|
||||||
|
grep -q "$TARGET_PLATFORM" "$PKG_DIR/platform" || exit 0
|
||||||
|
grep -q "\-$TARGET_PLATFORM" "$PKG_DIR/platform" && exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
$SCRIPTS/build $@
|
||||||
|
|
||||||
|
printf "%${INDENT}c CREATE ADDON $1\n" >&$SILENT_OUT
|
||||||
|
export INDENT=$((${INDENT:-1}+$INDENT_SIZE))
|
||||||
|
|
||||||
|
if [ -f $PKG_DIR/addon ]; then
|
||||||
|
$PKG_DIR/addon $@ >&$VERBOSE_OUT
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user