#!/bin/sh

PATCH_DIR=`pwd`/src/ozone/patches/
HACKING_BRANCH=master-ozone

echo "Ozone-Wayland: patching Chromium"
cd src/

# we switch to $HACKING_BRANCH before anything
git checkout master

exists=`git show-ref refs/heads/$HACKING_BRANCH`
if [ -n "$exists" ]; then
  git branch -D $HACKING_BRANCH
fi

git checkout -b $HACKING_BRANCH origin/master
git am $PATCH_DIR/00*

# jump now to mesa dir and apply the needed patches there
cd third_party/mesa/src
git reset --hard origin/master
git am $PATCH_DIR/100*

#!/bin/sh

PATCH_DIR=`pwd`/src/ozone/patches/
HACKING_BRANCH=master-ozone

echo "Ozone-Wayland: patching Chromium"
cd src/

# we switch to $HACKING_BRANCH before anything
git checkout master

exists=`git show-ref refs/heads/$HACKING_BRANCH`
if [ -n "$exists" ]; then
  git branch -D $HACKING_BRANCH
fi

git checkout -b $HACKING_BRANCH master
git am $PATCH_DIR/00*

# jump now to mesa dir and apply the needed patches there
cd third_party/mesa/src
git reset --hard origin/master
git am $PATCH_DIR/100*

Fix script accordingly new pin practices
patches: Fix script accordingly new pin practices

origin/master now contains the newest fetched tip of Chromium tree and it's not
actually the version Ozone-Wayland wants to be build with. Instead the script
needs to create a new hacking branch based on 'master', assuming 'master' is
the branch used when last synced (gclient sync).
