env files: Simplify

We don't need anymore the DISTRO_TYPE, DISTRO_OSTREE and MACHINE_TYPE.

Also the "set -a" was causing troubles after sourcing the script in ZSH
and doing copy-pastes. Therefore we just export the required variables.
This commit is contained in:
Alexandre Bard 2021-07-29 11:11:50 +02:00
parent 515c0c494e
commit bab4288468
8 changed files with 15 additions and 30 deletions

View File

@ -1,18 +1,15 @@
set -a # exports all variables if [ -z "$DISTRO" ]; then
echo "No distro selected. Please source a helper script (env.*)"
# exporting DISTRO* fi
DISTRO_OSTREE=$DISTRO_OSTREE
DISTRO_TYPE=$DISTRO_TYPE
DISTRO=netmodule-linux$DISTRO_OSTREE$DISTRO_TYPE
if [ -z "$MACHINE" ]; then if [ -z "$MACHINE" ]; then
. ./machine_select . ./machine_select
fi fi
MACHINE_TYPE=$(echo $MACHINE | rev | cut -f2- -d- | rev)
echo Building for machine $MACHINE, distro: $DISTRO echo Building for machine $MACHINE, distro: $DISTRO
OSTREE_OSNAME=nm-linux export DISTRO
export MACHINE
export OSTREE_OSNAME=nm-linux
. ./openembedded-core/oe-init-build-env build$BUILD_FOLDER_APPEND . ./openembedded-core/oe-init-build-env build$BUILD_FOLDER_APPEND

View File

@ -1,5 +1,3 @@
DISTRO_OSTREE="" DISTRO="netmodule-linux"
DISTRO_TYPE=""
BUILD_FOLDER_APPEND="" BUILD_FOLDER_APPEND=""
. ./env.common . ./env.common

View File

@ -1,5 +1,3 @@
DISTRO_OSTREE="" DISTRO="netmodule-linux-fct"
DISTRO_TYPE="-fct" BUILD_FOLDER_APPEND="-fct"
BUILD_FOLDER_APPEND=$DISTRO_TYPE
. ./env.common . ./env.common

View File

@ -1,5 +1,3 @@
DISTRO_OSTREE="" DISTRO="netmodule-linux-lava"
DISTRO_TYPE="-lava"
BUILD_FOLDER_APPEND="-fct" BUILD_FOLDER_APPEND="-fct"
. ./env.common . ./env.common

View File

@ -1,5 +1,3 @@
DISTRO_OSTREE="" DISTRO="netmodule-linux-minimal"
DISTRO_TYPE="-minimal" BUILD_FOLDER_APPEND="-minimal"
BUILD_FOLDER_APPEND=$DISTRO_TYPE
. ./env.common . ./env.common

View File

@ -1,5 +1,3 @@
DISTRO_OSTREE="-ostree" DISTRO="netmodule-linux-ostree"
DISTRO_TYPE=""
BUILD_FOLDER_APPEND="" BUILD_FOLDER_APPEND=""
. ./env.common . ./env.common

View File

@ -1,5 +1,3 @@
DISTRO_OSTREE="-ostree" DISTRO="netmodule-linux-ostree-vcu"
DISTRO_TYPE="-vcu"
BUILD_FOLDER_APPEND="" BUILD_FOLDER_APPEND=""
. ./env.common . ./env.common

View File

@ -13,7 +13,6 @@ HW24="nrhw24 - NB800 facelift"
HW25="hw25 - TC Router" HW25="hw25 - TC Router"
HW26="hw26 - NG800" HW26="hw26 - NG800"
set -a
select opt in HW16 HW18 HW20 HW21 HW23 DLM HW24 HW25 HW26 select opt in HW16 HW18 HW20 HW21 HW23 DLM HW24 HW25 HW26
do do
case $opt in case $opt in
@ -58,3 +57,4 @@ do
done done
echo $MACHINE echo $MACHINE
export MACHINE