diff options
author | Laurent Bonnans <laurent.bonnans@here.com> | 2018-06-22 14:52:25 +0200 |
---|---|---|
committer | Laurent Bonnans <laurent.bonnans@here.com> | 2018-06-22 15:38:08 +0200 |
commit | d25358cf0127f769c6d2b3b73b1a50acae78cee9 (patch) | |
tree | f11989185fa28f9d5c0aaaccf081b4751f989bd1 /scripts/ci/configure.sh | |
parent | 991c2752340bfd8140e6254ca1e9cd3c48bceff7 (diff) | |
download | meta-updater-d25358cf0127f769c6d2b3b73b1a50acae78cee9.tar.gz |
Use plain bash instead of hacky sed for CI config files
Diffstat (limited to 'scripts/ci/configure.sh')
-rwxr-xr-x | scripts/ci/configure.sh | 20 |
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} | |||
8 | TEST_REPO_DIR=${TEST_REPO_DIR:-updater-repo} | 8 | TEST_REPO_DIR=${TEST_REPO_DIR:-updater-repo} |
9 | 9 | ||
10 | TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.} | 10 | TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.} |
11 | TEST_LOCAL_CONF_APPEND=${TEST_LOCAL_CONF_APPEND:-} | ||
12 | TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master} | 11 | TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master} |
13 | TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="${TEST_AKTUALIZR_DIR}/.git" git rev-parse "${TEST_AKTUALIZR_BRANCH}")} | 12 | TEST_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 |
16 | rm -rf "${TEST_BUILD_DIR}/conf.old" || true | 15 | rm -rf "${TEST_BUILD_DIR}/conf.old" || true |
17 | mv "${TEST_BUILD_DIR}/conf" "${TEST_BUILD_DIR}/conf.old" || true | 16 | mv "${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 | ||
26 | if [[ -n $TEST_LOCAL_CONF_APPEND ]]; then | 25 | echo ">> Set aktualizr branch in bitbake's config" |
27 | echo ">> Appending to local.conf" | 26 | |
28 | REMOTE_AKTUALIZR_BRANCH=$(sed 's#^[^/]*/##g' <<< "$TEST_AKTUALIZR_BRANCH") | 27 | cat << EOF > "${TEST_BUILD_DIR}/conf/site.conf" |
29 | cat "$TEST_LOCAL_CONF_APPEND" | \ | 28 | SANITY_TESTED_DISTROS = "" |
30 | sed "s/\$<rev-sha1>/$TEST_AKTUALIZR_REV/g" | \ | 29 | SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV" |
31 | sed "s/\$<rev-branch>/$REMOTE_AKTUALIZR_BRANCH/g" \ | 30 | SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}" |
32 | >> "${TEST_BUILD_DIR}/conf/local.conf" | 31 | BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH" |
33 | fi | 32 | BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}" |
33 | EOF | ||