Make script executable and BSD sed compatible

This patch sets the sources-branch-updater script to be executable and adjusts
the in-place sed operation to work for both GNU sed and BSD sed.

Partially implements: blueprint master-kilofication
Change-Id: Ic2cd6a3a6a25d590c9cdbae8026dc3c4d5d5674d
This commit is contained in:
Jesse Pretorius 2015-04-24 09:06:19 +01:00 committed by Kevin Carter
parent bdee1d5ac8
commit 28a2de8204

2
scripts/sources-branch-updater.sh Normal file → Executable file
View File

@ -65,7 +65,7 @@ for repo in $(grep 'git_repo\:' ${SERVICE_FILE});do
# Set the branch entry
branch_entry="${branch_sha} # HEAD of \"$ONLINE_BRANCH\" as of $(date +%d.%m.%Y)"
# Write the branch entry
sed -i "s|${repo_name}_git_install_branch:.*|${repo_name}_git_install_branch: $branch_entry|" ${SERVICE_FILE}
sed -i '' "s|${repo_name}_git_install_branch:.*|${repo_name}_git_install_branch: $branch_entry|" ${SERVICE_FILE}
echo "processed $repo_name @ $branch_entry"
fi
done