Improve script for setting up interoperability with Overleaf
This commit is contained in:
parent
65521e35df
commit
517584a5e4
11
README.md
11
README.md
@ -31,11 +31,14 @@ following templates are handled:
|
||||
If you are to use another template, prepare an MR to this repo first!
|
||||
Do not add directly to your specific paper.
|
||||
|
||||
Interoperation with Overleaf
|
||||
----------------------------
|
||||
Interoperatibility with Overleaf
|
||||
--------------------------------
|
||||
|
||||
Overleaf handles git but in an imperfect way (to put it mildly). It's better to upload a
|
||||
package to Overleaf first:
|
||||
Overleaf handles git but in an imperfect way (to put it mildly).
|
||||
It's better to upload a package to Overleaf first.
|
||||
|
||||
You can do this by running `helpers/set-up-overleaf.sh` after creating a project
|
||||
or carrying out the following steps manually:
|
||||
|
||||
1. Create a project locally.
|
||||
2. Run `make`
|
||||
|
@ -1,9 +1,18 @@
|
||||
#!/bin/bash -x
|
||||
#!/bin/bash -e
|
||||
|
||||
echo "Setting up interoperability with Overleaf..."
|
||||
echo "Note that you need ability to clone repos from Overleaf."
|
||||
|
||||
original_git_url=$(git remote get-url origin)
|
||||
|
||||
echo "Make sure $original_git_url exists at your git server."
|
||||
echo "It should be created as en empty repo, *uncheck* option"
|
||||
echo "'Initialize repository with a README' or similar."
|
||||
|
||||
echo ""
|
||||
echo "Press ENTER to start"
|
||||
read
|
||||
|
||||
here_dir=$(basename $PWD)
|
||||
|
||||
|
||||
@ -45,7 +54,7 @@ cookiecutter https://git.wmi.amu.edu.pl/filipg/paper-cutter.git --checkout maste
|
||||
git add --all
|
||||
git commit -m 'Bring back all the files'
|
||||
|
||||
perl -pne 's/OVERLEAF_GIT_URL=/OVERLEAF_GIT_URL='$overleaf_git_url'/' -i helpers/vars
|
||||
perl -pne 's{OVERLEAF_GIT_URL=}{OVERLEAF_GIT_URL='$overleaf_git_url'}' -i helpers/vars
|
||||
|
||||
git push overleaf master
|
||||
git push origin master
|
||||
|
Loading…
Reference in New Issue
Block a user