nixpkgs-update/delete-merged.sh
2018-03-17 08:07:03 -07:00

11 lines
308 B
Bash
Executable File

#! /usr/bin/env bash
set -euxo pipefail
git fetch --prune origin
git fetch --prune upstream
git checkout master
git reset --hard upstream/master
git branch -ra --merged | grep "origin/auto-update" | sed -e 's|^ remotes/origin/\(.*\)|git push origin :\1|' | while IFS= read -r line; do eval "$line"; done