framework/script/schematics.sh

27 lines
643 B
Bash
Raw Normal View History

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
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
git clone --depth 1 gitea@$hostname:chipmunk.land-kaboomserver/schematics.git $folder
2020-05-08 20:09:49 -04:00
fi
cd $folder
if [ "$(git add $(git ls-files -o) -v)" ]; then
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