Blob Blame History Raw
#!/bin/sh
pkg=$1
if [ -z "$pkg" ] ; then
    echo "usage: $0 PKG"
    exit 1
fi
p=packages/*/$pkg
files=$(git status $p | perl -ne 'm/modified: (.*)/ && print "$1\n"')
if ! grep '>>>>>>' $files ; then
    exit 0 # nothing to fix
fi
git checkout $files
cd $p && git commit --amend -a
git fetch origin
git diff origin/master
echo "(cd $p && git pushf)"
read
(cd $p && git pushf)