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"
|
export PATH="$TCDIR/bin:$PATH"
|
||||||
|
|
||||||
source "$SCRIPTDIR/board/$BOARD/TOOLCHAIN"
|
|
||||||
|
|
||||||
mkdir -p "$TCDIR/$TARGET"
|
|
||||||
|
|
||||||
CMAKETCFILE="$TCDIR/toolchain.cmake"
|
|
||||||
|
|
||||||
pushd "$SCRIPTDIR" > /dev/null
|
pushd "$SCRIPTDIR" > /dev/null
|
||||||
OS_NAME="Pygos"
|
OS_NAME="Pygos"
|
||||||
OS_RELEASE=$(git describe --always --tags --dirty)
|
OS_RELEASE=$(git describe --always --tags --dirty)
|
||||||
|
@ -65,6 +59,13 @@ source "$SCRIPTDIR/util/pkgcmd.sh"
|
||||||
source "$SCRIPTDIR/util/toolchain.sh"
|
source "$SCRIPTDIR/util/toolchain.sh"
|
||||||
source "$SCRIPTDIR/util/misc.sh"
|
source "$SCRIPTDIR/util/misc.sh"
|
||||||
|
|
||||||
|
############################## toolchain config ##############################
|
||||||
|
include_merge "TOOLCHAIN"
|
||||||
|
|
||||||
|
mkdir -p "$TCDIR/$TARGET"
|
||||||
|
|
||||||
|
CMAKETCFILE="$TCDIR/toolchain.cmake"
|
||||||
|
|
||||||
############################### build packages ###############################
|
############################### build packages ###############################
|
||||||
echo "--- resolving package dependencies ---"
|
echo "--- resolving package dependencies ---"
|
||||||
|
|
||||||
|
|
|
@ -28,15 +28,7 @@ deploy() {
|
||||||
|
|
||||||
cp -r ${SCRIPTDIR}/pkg/${PKGNAME}/{etc,lib,share} "$DEPLOY"
|
cp -r ${SCRIPTDIR}/pkg/${PKGNAME}/{etc,lib,share} "$DEPLOY"
|
||||||
|
|
||||||
if [ -e "$SCRIPTDIR/board/$BOARD/INIT" ]; then
|
include_merge "INIT"
|
||||||
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
|
|
||||||
|
|
||||||
if [ "x$HWCLOCK" == "xyes" ]; then
|
if [ "x$HWCLOCK" == "xyes" ]; then
|
||||||
ln -s "/share/init/hwclock" "$DEPLOY/etc/init.d/hwclock"
|
ln -s "/share/init/hwclock" "$DEPLOY/etc/init.d/hwclock"
|
||||||
|
|
20
util/misc.sh
20
util/misc.sh
|
@ -33,6 +33,26 @@ cat_file_merge() {
|
||||||
fi
|
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() {
|
apply_patches() {
|
||||||
local PATCH
|
local PATCH
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue