mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-29 12:54:10 +00:00
build_all.sh: specify a list of projects as extra args
Add the ability to specify a list of projects to process, instead of processing all projects (default behaviour). Fixes: #244 Signed-off-by: Marco Vedovati <mvedovati@suse.com>
This commit is contained in:
parent
e5a2f4aa45
commit
3fe90cc439
@ -41,9 +41,13 @@ main() {
|
|||||||
local branch="${1:-}"
|
local branch="${1:-}"
|
||||||
[ -n "${branch}" ] || usage "missing branch" "1"
|
[ -n "${branch}" ] || usage "missing branch" "1"
|
||||||
|
|
||||||
pushd "${script_dir}"
|
shift
|
||||||
for p in "${OBS_PKGS_PROJECTS[@]}"; do
|
local projectsList=("$@")
|
||||||
pushd "$p" >>/dev/null
|
[ "${#projectsList[@]}" = "0" ] && projectsList=("${OBS_PKGS_PROJECTS[@]}")
|
||||||
|
|
||||||
|
pushd "${script_dir}" >>/dev/null
|
||||||
|
for p in "${projectsList[@]}"; do
|
||||||
|
[ -d "$p" ] || usage "$p is not a valid project directory" "1"
|
||||||
update_cmd="./update.sh"
|
update_cmd="./update.sh"
|
||||||
if [ -n "${PUSH}" ]; then
|
if [ -n "${PUSH}" ]; then
|
||||||
# push to obs
|
# push to obs
|
||||||
@ -53,11 +57,13 @@ main() {
|
|||||||
update_cmd+=" -l"
|
update_cmd+=" -l"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "update ${p}"
|
echo "======= Updating ${p} ======="
|
||||||
|
pushd "$p" >>/dev/null
|
||||||
bash -c "${update_cmd} ${branch}"
|
bash -c "${update_cmd} ${branch}"
|
||||||
popd >>/dev/null
|
popd >>/dev/null
|
||||||
|
echo ""
|
||||||
done
|
done
|
||||||
popd
|
popd >> /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
main $@
|
main $@
|
||||||
|
Loading…
Reference in New Issue
Block a user