Rebuild patches after we continue from a paper edit.

This commit is contained in:
DemonWav
2016-04-02 18:34:27 -05:00
parent 526469fd23
commit aeea23a135
11 changed files with 44 additions and 35 deletions

50
paper
View File

@@ -49,29 +49,37 @@ case "$1" in
cd "$basedir"
;;
"e" | "edit")
if [[ "$2" = "server" ]] ; then
cd "$basedir/Paper-Server"
export LAST_EDIT=$(pwd)
case "$2" in
"server")
cd "$basedir/Paper-Server"
export LAST_EDIT=$(pwd)
paperstash
git rebase -i upstream/upstream
paperunstash
elif [[ "$2" = "api" ]] ; then
cd "$basedir/Paper-API"
export LAST_EDIT=$(pwd)
paperstash
git rebase -i upstream/upstream
paperunstash
;;
"api")
cd "$basedir/Paper-API"
export LAST_EDIT=$(pwd)
paperstash
git rebase -i upstream/upstream
paperunstash
elif [[ "$2" = "continue" ]] ; then
cd "$LAST_EDIT"
git add .
git rebase --continue
unset LAST_EDIT
scripts/rebuildPatches.sh "$basedir"
else
echo "You must edit either the api or server."
fi
paperstash
git rebase -i upstream/upstream
paperunstash
;;
"continue")
cd "$LAST_EDIT"
git add .
git rebase --continue
unset LAST_EDIT
(
cd "$basedir"
scripts/rebuildPatches.sh "$basedir"
)
;;
*)
echo "You must edit either the api or server."
;;
esac
;;
"setup")
if [[ -f ~/.bashrc ]] ; then