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:-}"
|
||||
[ -n "${branch}" ] || usage "missing branch" "1"
|
||||
|
||||
pushd "${script_dir}"
|
||||
for p in "${OBS_PKGS_PROJECTS[@]}"; do
|
||||
pushd "$p" >>/dev/null
|
||||
shift
|
||||
local projectsList=("$@")
|
||||
[ "${#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"
|
||||
if [ -n "${PUSH}" ]; then
|
||||
# push to obs
|
||||
@ -53,11 +57,13 @@ main() {
|
||||
update_cmd+=" -l"
|
||||
fi
|
||||
|
||||
echo "update ${p}"
|
||||
echo "======= Updating ${p} ======="
|
||||
pushd "$p" >>/dev/null
|
||||
bash -c "${update_cmd} ${branch}"
|
||||
popd >>/dev/null
|
||||
echo ""
|
||||
done
|
||||
popd
|
||||
popd >> /dev/null
|
||||
}
|
||||
|
||||
main $@
|
||||
|
Loading…
Reference in New Issue
Block a user