mirror of
https://github.com/pygos/build.git
synced 2024-12-23 23:50:51 +01:00
Cleanup file override behaviour
Look for board specific product files in product/$product/$board/ Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
b0a3baf8bb
commit
5388c0f925
7 changed files with 19 additions and 20 deletions
|
@ -34,6 +34,9 @@ deploy() {
|
|||
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
|
||||
ln -s "/share/init/hwclock" "$DEPLOY/etc/init.d/hwclock"
|
||||
|
|
36
util/misc.sh
36
util/misc.sh
|
@ -1,20 +1,18 @@
|
|||
file_path_override() {
|
||||
local fname="$1"
|
||||
|
||||
if [ -e "$SCRIPTDIR/product/$PRODUCT/${fname}.${BOARD}" ]; then
|
||||
echo "$SCRIPTDIR/product/$PRODUCT/${fname}.${BOARD}"
|
||||
if [ -e "$SCRIPTDIR/product/$PRODUCT/$BOARD/$1" ]; then
|
||||
echo "$SCRIPTDIR/product/$PRODUCT/$BOARD/$1"
|
||||
return
|
||||
fi
|
||||
if [ -e "$SCRIPTDIR/product/$PRODUCT/$fname" ]; then
|
||||
echo "$SCRIPTDIR/product/$PRODUCT/$fname"
|
||||
if [ -e "$SCRIPTDIR/product/$PRODUCT/$1" ]; then
|
||||
echo "$SCRIPTDIR/product/$PRODUCT/$1"
|
||||
return
|
||||
fi
|
||||
if [ -e "$SCRIPTDIR/board/$BOARD/$fname" ]; then
|
||||
echo "$SCRIPTDIR/board/$BOARD/$fname"
|
||||
if [ -e "$SCRIPTDIR/board/$BOARD/$1" ]; then
|
||||
echo "$SCRIPTDIR/board/$BOARD/$1"
|
||||
return
|
||||
fi
|
||||
if [ -e "$SCRIPTDIR/product/common/$fname" ]; then
|
||||
echo "$SCRIPTDIR/product/common/$fname"
|
||||
if [ -e "$SCRIPTDIR/product/common/$1" ]; then
|
||||
echo "$SCRIPTDIR/product/common/$1"
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
@ -28,19 +26,17 @@ cat_file_override() {
|
|||
}
|
||||
|
||||
cat_file_merge() {
|
||||
local fname="$1"
|
||||
|
||||
if [ -e "$SCRIPTDIR/product/$PRODUCT/${fname}.${BOARD}" ]; then
|
||||
cat "$SCRIPTDIR/product/$PRODUCT/${fname}.${BOARD}"
|
||||
if [ -e "$SCRIPTDIR/product/$PRODUCT/$BOARD/$1" ]; then
|
||||
cat "$SCRIPTDIR/product/$PRODUCT/$BOARD/$1"
|
||||
fi
|
||||
if [ -e "$SCRIPTDIR/product/$PRODUCT/$fname" ]; then
|
||||
cat "$SCRIPTDIR/product/$PRODUCT/$fname"
|
||||
if [ -e "$SCRIPTDIR/product/$PRODUCT/$1" ]; then
|
||||
cat "$SCRIPTDIR/product/$PRODUCT/$1"
|
||||
fi
|
||||
if [ -e "$SCRIPTDIR/board/$BOARD/$fname" ]; then
|
||||
cat "$SCRIPTDIR/board/$BOARD/$fname"
|
||||
if [ -e "$SCRIPTDIR/board/$BOARD/$1" ]; then
|
||||
cat "$SCRIPTDIR/board/$BOARD/$1"
|
||||
fi
|
||||
if [ -e "$SCRIPTDIR/product/common/$fname" ]; then
|
||||
cat "$SCRIPTDIR/product/common/$fname"
|
||||
if [ -e "$SCRIPTDIR/product/common/$1" ]; then
|
||||
cat "$SCRIPTDIR/product/common/$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue