Skip to content

Instantly share code, notes, and snippets.

@relrod
Created November 18, 2013 17:43
Show Gist options
  • Save relrod/7532036 to your computer and use it in GitHub Desktop.
Save relrod/7532036 to your computer and use it in GitHub Desktop.
Useful bash aliases/functions for Fedora contributors and packagers.
# Find packages that you own (or co-own) which are not listed on
# the "Upstream release monitoring" page.
function unmonpkgs {
username="codeblock"
f=`mktemp`
curl -so $f "https://fedoraproject.org/wiki/Upstream_release_monitoring"
for i in `pkgdb-cli list --user "$username" | head -n -1 | awk "{print \\\$1}"`; do
grep "\* $i " $f >/dev/null || echo "Not found: $i"
done
rm $f
}
# Merge changes from the current branch to all the other branches, and build
# each branch as we go. Workflow for using this is:
# - Make your changes on a branch (usually master) (upload new sources, etc.)
# - Commit your changes, and do `fedpkg build` - ensure everything builds on master.
# - Run `merge-everything` to have your changes merged+built on other branches.
function merge-everything {
currentbranch=$(git rev-parse --abbrev-ref HEAD)
for branch in $(git branch | grep -v "$currentbranch"); do
git checkout "$branch"
git merge "$currentbranch"
git push
fedpkg build
if [ $? -gt 0 ]; then
echo "Failed to build the package on branch $branch - aborting mission."
break
fi
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment