Commit 4fc5f458 authored by Bastien Le Querrec's avatar Bastien Le Querrec

download patches from github directly

parent d04e57c9
......@@ -7,7 +7,8 @@ fi
for file in "$@"; do
commit=$(echo ${file##*/} | sed 's/.patch$//')
sed -i -e 's/org.thoughtcrime.securesms/org.smssecure.smssecure/g' \
sed -i -e 's/org\/thoughtcrime\/securesms/org\/smssecure\/smssecure/' \
-e 's/org.thoughtcrime.securesms/org.smssecure.smssecure/g' \
-e 's/org.thoughtcrime.provider.securesms/org.smssecure.provider.smssecure/g' \
-e 's/org.smssecure.smssecure.util.TextSecure/org.smssecure.smssecure.util.Silence/g' \
-e 's/org.thoughtcrime.redphone.util/org.smssecure.smssecure.util/g' \
......
......@@ -6,6 +6,8 @@
set -eo pipefail
UPSTREAM="https://github.com/signalapp/Signal-Android"
if [ "$#" -lt 1 ]; then
echo "usage: ./scripts/import-patch.sh <commit SHAs>"
exit 1
......@@ -17,17 +19,8 @@ fi
cwd=`pwd`
if [ ! -d "../Signal-Android" ]; then
echo "Signal-Android repo not found (clone it to $cwd/../Signal-Android)"
exit 1
fi
cd ../Signal-Android
git pull origin master > /dev/null 2>&1
for sha in "$@"; do
git checkout "$sha" 2> /dev/null
git format-patch -1 --minimal --stdout > "$cwd/$sha.patch" 2> /dev/null
wget "$UPSTREAM/commit/$sha.patch" 2> /dev/null
$cwd/scripts/fix-patch.sh "$cwd/$sha.patch"
done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment