workaround for pmbs tmpdir issue
#!/bin/bash | |
# workaround for pmbs tmpdir issue | |
# usage: | |
# watch -n 60 -e ./rebuild Multimedia obs-studio | |
project=$1 | |
package=$2 | |
results=($(osc results $project $package)) | |
complete=true | |
for ((i = 2; i < ${#results[@]}; i=i+3)) | |
do | |
status="${results[$i]}" | |
if [[ "$status" == "failed" ]]; then | |
echo -n "rebuild ${results[$((i - 2))]} ${results[$((i - 1))]}..." | |
osc rebuild $project $package ${results[$((i - 2))]} ${results[$((i - 1))]} | |
fi | |
if [[ "$status" != "succeeded" && "$status" != "disabled" && "$status" != "unresolvable" ]]; then | |
complete=false | |
fi | |
done | |
# signal complete with non-zero code for watch style execution | |
if [[ "$complete" == "true" ]]; then | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment