Last active
September 29, 2016 20:45
-
-
Save boombatower/060d80ad1205407baf397e33f19d200a to your computer and use it in GitHub Desktop.
workaround for pmbs tmpdir issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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