summaryrefslogtreecommitdiffstats
path: root/scripts/ci/configure.sh
diff options
context:
space:
mode:
authorLaurent Bonnans <laurent.bonnans@here.com>2018-06-22 14:52:25 +0200
committerLaurent Bonnans <laurent.bonnans@here.com>2018-06-22 15:38:08 +0200
commitd25358cf0127f769c6d2b3b73b1a50acae78cee9 (patch)
treef11989185fa28f9d5c0aaaccf081b4751f989bd1 /scripts/ci/configure.sh
parent991c2752340bfd8140e6254ca1e9cd3c48bceff7 (diff)
downloadmeta-updater-d25358cf0127f769c6d2b3b73b1a50acae78cee9.tar.gz
Use plain bash instead of hacky sed for CI config files
Diffstat (limited to 'scripts/ci/configure.sh')
-rwxr-xr-xscripts/ci/configure.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/ci/configure.sh b/scripts/ci/configure.sh
index 36ed059..cf42825 100755
--- a/scripts/ci/configure.sh
+++ b/scripts/ci/configure.sh
@@ -8,11 +8,10 @@ TEST_BUILD_DIR=${TEST_BUILD_DIR:-build}
8TEST_REPO_DIR=${TEST_REPO_DIR:-updater-repo} 8TEST_REPO_DIR=${TEST_REPO_DIR:-updater-repo}
9 9
10TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.} 10TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.}
11TEST_LOCAL_CONF_APPEND=${TEST_LOCAL_CONF_APPEND:-}
12TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master} 11TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master}
13TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="${TEST_AKTUALIZR_DIR}/.git" git rev-parse "${TEST_AKTUALIZR_BRANCH}")} 12TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="${TEST_AKTUALIZR_DIR}/.git" git rev-parse "${TEST_AKTUALIZR_BRANCH}")}
14 13
15# remove existing local.conf, keep 14# move existing conf directory to backup, before generating a new one
16rm -rf "${TEST_BUILD_DIR}/conf.old" || true 15rm -rf "${TEST_BUILD_DIR}/conf.old" || true
17mv "${TEST_BUILD_DIR}/conf" "${TEST_BUILD_DIR}/conf.old" || true 16mv "${TEST_BUILD_DIR}/conf" "${TEST_BUILD_DIR}/conf.old" || true
18 17
@@ -23,11 +22,12 @@ echo ">> Running envsetup.sh"
23. "${TEST_REPO_DIR}/meta-updater/scripts/envsetup.sh" "${TEST_MACHINE}" "${TEST_BUILD_DIR}" 22. "${TEST_REPO_DIR}/meta-updater/scripts/envsetup.sh" "${TEST_MACHINE}" "${TEST_BUILD_DIR}"
24) 23)
25 24
26if [[ -n $TEST_LOCAL_CONF_APPEND ]]; then 25echo ">> Set aktualizr branch in bitbake's config"
27 echo ">> Appending to local.conf" 26
28 REMOTE_AKTUALIZR_BRANCH=$(sed 's#^[^/]*/##g' <<< "$TEST_AKTUALIZR_BRANCH") 27cat << EOF > "${TEST_BUILD_DIR}/conf/site.conf"
29 cat "$TEST_LOCAL_CONF_APPEND" | \ 28SANITY_TESTED_DISTROS = ""
30 sed "s/\$<rev-sha1>/$TEST_AKTUALIZR_REV/g" | \ 29SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV"
31 sed "s/\$<rev-branch>/$REMOTE_AKTUALIZR_BRANCH/g" \ 30SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}"
32 >> "${TEST_BUILD_DIR}/conf/local.conf" 31BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH"
33fi 32BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}"
33EOF