Browse Source

build.sh: fix TARGETS listing

Karsten Böddeker 6 years ago
parent
commit
c3df2d3529
1 changed files with 2 additions and 2 deletions
  1. 2 2
      build.sh

+ 2 - 2
build.sh

@@ -172,7 +172,7 @@ make update
 
 ### set reasonable defaults for ${TARGETS} and ${BRANCH} if unset
 if [ -z "${TARGETS}" ]; then
-	TARGETS=$(make list-targets | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
+	TARGETS=$(make list-targets | sed ':a;N;$!ba;s/\n/ /g')
 	info "building all targets: '${TARGETS}'"
 fi
 if [ "${BRANCH}" == "experimental" -a -z "${VERSION}" ] ; then
@@ -193,7 +193,7 @@ echo "VERSION=${VERSION}" >> ${build_info_path}
 echo "GLUON=${GLUON_COMMIT} # ${BASE}" >> ${build_info_path}
 echo "BRANCH=${BRANCH}" >> ${build_info_path}
 echo "SITE=${SITE_COMMIT} # ${VERSION}" >> ${build_info_path}
-echo "TARGETS=${TARGETS}" >> ${build_info_path}
+echo "TARGETS='${TARGETS}'" >> ${build_info_path}
 echo "TS=${BUILD_TS}" >> ${build_info_path}
 
 ### restore opkg-keys