update core-update script

This commit is contained in:
B. Petersen 2019-10-02 20:57:13 +02:00
parent e92d91ec3a
commit 6a9a160f08
No known key found for this signature in database
GPG key ID: 3B88E92DEA8E9AFC

View file

@ -1,38 +1,22 @@
# this script updates the deltachat-core sub-repository from github. # this script updates the deltachat-core-rust sub-repository from github.
# must be executed from the repo root. # must be executed from the repo root.
# #
# - make sure, the deltachat-android directory is clean # - make sure, the deltachat-android directory is clean
# - make sure, deltachat-core is committed successfull before calling this script # - make sure, deltachat-core-rust is committed successfully before calling this script
# - the script assumes, deltachat-core is placed in the same directory as deltachat-android
#
# to simplify core-development, files in the submodule folder are replaced by
# symbolic links to ../deltachat-core afterwards
# remove links to the files
rm -r jni/messenger-backend/*
rm -r jni/messenger-backend/.??*
# check out submodules as present in the repository # check out submodules as present in the repository
git submodule update --init --recursive git submodule update --init --recursive
# update submodule # update submodule
cd jni/messenger-backend cd jni/deltachat-core-rust
git checkout master git checkout master
git pull git pull
cd ../.. cd ../..
# commit changes # commit changes
git add jni/messenger-backend/ git add jni/deltachat-core-rust
git commit -m "Update messenger-backend submodule." git commit -m "update deltachat-core-rust submodule"
# remove files downloaded just for committing
rm -r jni/messenger-backend/*
rm -r jni/messenger-backend/.??*
# re-link all files (symbolic links may contain arbitrary text, so no relative paths, please)
cd ..
ln --symbolic `pwd`/deltachat-core/src deltachat-android/jni/messenger-backend/src
ln --symbolic `pwd`/deltachat-core/libs deltachat-android/jni/messenger-backend/libs
cd deltachat-android
echo "changes are commited to local repo."
echo "use 'git push' to use them or 'git reset HEAD~1; git submodule update --recursive' to abort on your own risk :)"