Created
February 7, 2019 21:22
-
-
Save kokosing/211aa00616c322c9ce9ea038e69cd0df to your computer and use it in GitHub Desktop.
manual_merge.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -xeuo pipefail | |
other_repo=~/presto-private | |
pushd "$other_repo" | |
files="$(git log --name-status -1 | grep '^[AM]\s' | awk '{print $2}')" | |
popd | |
for file in $files; do | |
target_file="$(echo $file | sed 's@com/facebook/presto@io/prestosql@g')" | |
echo processing $file to $target_file | |
mkdir -p $(dirname "$target_file") | |
cp "$other_repo/$file" "$target_file" | |
sed -i 's/com.facebook.presto/io.prestosql/g' "$target_file" | |
git add "$target_file" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment