2020-04-16 19:08:07 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Schematics are saved in a separate git repository.
|
|
|
|
# Only non-existing files are added to the repository.
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
2020-04-21 13:20:18 +00:00
|
|
|
ssh-keyscan github.com >> .ssh/known_hosts
|
2020-05-09 00:09:49 +00:00
|
|
|
folder=~/server/plugins/FastAsyncWorldEdit/schematics/
|
2020-04-21 13:20:18 +00:00
|
|
|
|
2020-04-16 19:08:07 +00:00
|
|
|
while true; do
|
2020-05-09 00:09:49 +00:00
|
|
|
if [ ! -d "$folder" ]; then
|
|
|
|
git clone --depth 1 git@github.com:kaboomserver/schematics.git $folder
|
|
|
|
fi
|
|
|
|
|
2020-08-02 11:51:56 +00:00
|
|
|
cd $folder
|
2020-07-16 03:31:07 +00:00
|
|
|
|
|
|
|
if [ "$(git add $(git ls-files -o) -v)" ]; then
|
2020-04-16 19:08:07 +00:00
|
|
|
git -c user.name='kaboom' -c user.email='kaboom.pw' commit -m "Add new schematics"
|
|
|
|
git push
|
|
|
|
fi
|
|
|
|
sleep 1
|
|
|
|
done
|