diff options
author | Ed Tanous <ed.tanous@intel.com> | 2019-06-20 19:46:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-20 19:46:38 +0300 |
commit | 43a183cc0926da36e3a218efa02ab4838ace316f (patch) | |
tree | 9ea192b408585fc2a19b54d196c3d56eaddc4acb /setup | |
parent | 5575b1d27fc222f973d96dc06af0f21ba7656f28 (diff) | |
parent | 2c7e8f4ce61f2e0407c37e98e22bbb13e562b414 (diff) | |
download | openbmc-43a183cc0926da36e3a218efa02ab4838ace316f.tar.xz |
Merge pull request #12 from Intel-BMC/update
Update
Diffstat (limited to 'setup')
-rwxr-xr-x | setup | 36 |
1 files changed, 20 insertions, 16 deletions
@@ -24,24 +24,28 @@ fi machine() { local target=$1 local build_dir=$2 - local mfg mach realmach - for mfg in meta-*; do - for mach in $mfg/meta-*; do - if [ -d "$mach" -a -d "$mach/conf/machine" ]; then - realmach=${mach##*meta-} - # If a target is specified, then check for a match, - # otherwise just list what we've discovered - if [ -n "$target" ]; then - if [ "$realmach" = "$target" ]; then - echo Machine $target is $mach - TEMPLATECONF="$mach/conf" source oe-init-build-env $build_dir - return - fi - else - echo "$realmach" + local cfg name tmpl + for cfg in meta-*/meta-*/conf/machine/*.conf; do + name=${cfg##*/} + name=${name%.conf} + tmpl=${cfg%/machine/*.conf} + # If a target is specified, then check for a match, + # otherwise just list what we've discovered + if [ -n "$target" ]; then + if [ "${name}" = "${target}" ]; then + echo "Machine ${target} found in ${tmpl%/conf}" + TEMPLATECONF="${tmpl}" source \ + oe-init-build-env ${build_dir} + + if [ "$(cat conf/templateconf.cfg)" = "${tmpl}" ]; then + sed "s/^\(MACHINE\s*[?:]*\s*=\s*\).*$/\1\"${target}\"/" \ + -i conf/local.conf fi + return fi - done + else + echo "${name}" + fi done [ -n "$target" ] && echo "No such machine!" |