mirror of
https://github.com/pygos/build.git
synced 2024-11-25 04:20:41 +01:00
Add helpers for override behaviour based shell inclusion
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
71ae37640f
commit
c6ae50eb40
3 changed files with 29 additions and 16 deletions
13
mk.sh
13
mk.sh
|
@ -47,12 +47,6 @@ mkdir -p "$PKGDEPLOYDIR" "$PKGDEVDEPLOYDIR" "$TCDIR/bin"
|
|||
|
||||
export PATH="$TCDIR/bin:$PATH"
|
||||
|
||||
source "$SCRIPTDIR/board/$BOARD/TOOLCHAIN"
|
||||
|
||||
mkdir -p "$TCDIR/$TARGET"
|
||||
|
||||
CMAKETCFILE="$TCDIR/toolchain.cmake"
|
||||
|
||||
pushd "$SCRIPTDIR" > /dev/null
|
||||
OS_NAME="Pygos"
|
||||
OS_RELEASE=$(git describe --always --tags --dirty)
|
||||
|
@ -65,6 +59,13 @@ source "$SCRIPTDIR/util/pkgcmd.sh"
|
|||
source "$SCRIPTDIR/util/toolchain.sh"
|
||||
source "$SCRIPTDIR/util/misc.sh"
|
||||
|
||||
############################## toolchain config ##############################
|
||||
include_merge "TOOLCHAIN"
|
||||
|
||||
mkdir -p "$TCDIR/$TARGET"
|
||||
|
||||
CMAKETCFILE="$TCDIR/toolchain.cmake"
|
||||
|
||||
############################### build packages ###############################
|
||||
echo "--- resolving package dependencies ---"
|
||||
|
||||
|
|
|
@ -28,15 +28,7 @@ deploy() {
|
|||
|
||||
cp -r ${SCRIPTDIR}/pkg/${PKGNAME}/{etc,lib,share} "$DEPLOY"
|
||||
|
||||
if [ -e "$SCRIPTDIR/board/$BOARD/INIT" ]; then
|
||||
source "$SCRIPTDIR/board/$BOARD/INIT"
|
||||
fi
|
||||
if [ -e "$SCRIPTDIR/product/$PRODUCT/INIT" ]; then
|
||||
source "$SCRIPTDIR/product/$PRODUCT/INIT"
|
||||
fi
|
||||
if [ -e "$SCRIPTDIR/product/$PRODUCT/$BOARD/INIT" ]; then
|
||||
source "$SCRIPTDIR/product/$PRODUCT/$BOARD/INIT"
|
||||
fi
|
||||
include_merge "INIT"
|
||||
|
||||
if [ "x$HWCLOCK" == "xyes" ]; then
|
||||
ln -s "/share/init/hwclock" "$DEPLOY/etc/init.d/hwclock"
|
||||
|
@ -74,4 +66,4 @@ deploy() {
|
|||
|
||||
check_update() {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
20
util/misc.sh
20
util/misc.sh
|
@ -33,6 +33,26 @@ cat_file_merge() {
|
|||
fi
|
||||
}
|
||||
|
||||
include_override() {
|
||||
local path=$(file_path_override "$1")
|
||||
|
||||
if [ ! -z "$path" ]; then
|
||||
source "$path"
|
||||
fi
|
||||
}
|
||||
|
||||
include_merge() {
|
||||
if [ -e "$SCRIPTDIR/board/$BOARD/$1" ]; then
|
||||
source "$SCRIPTDIR/board/$BOARD/$1"
|
||||
fi
|
||||
if [ -e "$SCRIPTDIR/product/$PRODUCT/$1" ]; then
|
||||
source "$SCRIPTDIR/product/$PRODUCT/$1"
|
||||
fi
|
||||
if [ -e "$SCRIPTDIR/product/$PRODUCT/$BOARD/$1" ]; then
|
||||
source "$SCRIPTDIR/product/$PRODUCT/$BOARD/$1"
|
||||
fi
|
||||
}
|
||||
|
||||
apply_patches() {
|
||||
local PATCH
|
||||
|
||||
|
|
Loading…
Reference in a new issue