2020-04-16 15:08:07 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Schematics are saved in a separate git repository.
|
|
|
|
# Only non-existing files are added to the repository.
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
2020-05-08 20:09:49 -04:00
|
|
|
folder=~/server/plugins/FastAsyncWorldEdit/schematics/
|
2023-02-01 22:24:10 -05:00
|
|
|
hostname=code.chipmunk.land
|
2022-05-17 16:41:22 -04:00
|
|
|
|
|
|
|
ssh-keygen -R $hostname
|
|
|
|
ssh-keyscan -H $hostname >> ~/.ssh/known_hosts
|
2020-04-21 09:20:18 -04:00
|
|
|
|
2020-04-16 15:08:07 -04:00
|
|
|
while true; do
|
2020-05-08 20:09:49 -04:00
|
|
|
if [ ! -d "$folder" ]; then
|
2023-02-01 21:15:03 -05:00
|
|
|
git clone --depth 1 gitea@$hostname:chipmunk.land-kaboomserver/schematics.git $folder
|
2020-05-08 20:09:49 -04:00
|
|
|
fi
|
|
|
|
|
2020-08-02 07:51:56 -04:00
|
|
|
cd $folder
|
2020-07-15 23:31:07 -04:00
|
|
|
|
|
|
|
if [ "$(git add $(git ls-files -o) -v)" ]; then
|
2023-02-01 21:15:03 -05:00
|
|
|
git -c user.name='Chipmunk Kaboom Schematic Uploader' -c user.email='kaboom-schems@chipmunk.land' commit -m "Add new schematics"
|
2020-04-16 15:08:07 -04:00
|
|
|
git push
|
|
|
|
fi
|
|
|
|
sleep 1
|
|
|
|
done
|