mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
buildsystem: add support for ~/.openelec/packages and ~/.openelec/$PROJECT/packages
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
6815ed89ec
commit
8dd001d54e
36
config/path
36
config/path
@ -77,7 +77,41 @@ SED="sed -i"
|
||||
_FOUND=0
|
||||
PKG_DIR=""
|
||||
|
||||
# first check project folder for a package
|
||||
# check project folder for a package in home dir
|
||||
for DIR in $(find $HOME/.openelec/$PROJECT/packages -type d -name $_PKG_ROOT_NAME 2>/dev/null); do
|
||||
if [ -r "$DIR/package.mk" ]; then
|
||||
# found first, set $PKG_DIR
|
||||
PKG_DIR="$DIR"
|
||||
# keep track of dirs with package.mk for detecting multiple folders
|
||||
_ALL_DIRS="${_ALL_DIRS}${DIR}\\n"
|
||||
_FOUND=$((_FOUND+1))
|
||||
if [ $_FOUND -gt 1 ]; then
|
||||
# _FOUND more ? fail
|
||||
echo "Error - multiple package folders:"
|
||||
echo -e "$_ALL_DIRS"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# check for a package in home dir if not found already
|
||||
for DIR in $(find $HOME/.openelec/packages -type d -name $_PKG_ROOT_NAME 2>/dev/null); do
|
||||
if [ -r "$DIR/package.mk" ]; then
|
||||
# found first, set $PKG_DIR
|
||||
PKG_DIR="$DIR"
|
||||
# keep track of dirs with package.mk for detecting multiple folders
|
||||
_ALL_DIRS="${_ALL_DIRS}${DIR}\\n"
|
||||
_FOUND=$((_FOUND+1))
|
||||
if [ $_FOUND -gt 1 ]; then
|
||||
# _FOUND more ? fail
|
||||
echo "Error - multiple package folders:"
|
||||
echo -e "$_ALL_DIRS"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# check project folder for a package if not found already
|
||||
for DIR in $(find $ROOT/projects/$PROJECT/packages -type d -name $_PKG_ROOT_NAME 2>/dev/null); do
|
||||
if [ -r "$DIR/package.mk" ]; then
|
||||
# found first, set $PKG_DIR
|
||||
|
Loading…
x
Reference in New Issue
Block a user