scripts: add script to create addons

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-07-18 00:45:43 +02:00
parent ebbd9da3da
commit 1c0befea49

29
scripts/create_addon Executable file
View 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