Upload/download scripts+gitignore

Made it ignore everything and force adding the needed files. This way it won't list a bunch of untracked files on each update.
Also removing all files in subfolders from the repo (before the new versions get added) so that if a config or a plugin(!) is removed it will remove it from the repo.
This commit is contained in:
Chromachine 2018-05-16 16:32:41 +00:00
parent 494c3ff3a2
commit 05fb6f3b44
3 changed files with 19 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
**

3
download.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
git pull

14
update.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
git rm --cached -rfq '*/*' # Unstage everything in folders in case a plugin got removed
#readarray -t plugins < <(ls -a *.jar | cut -d "." -f 1 | cut -d "-" -f 1 | cut -d "_" -f 1
readarray -t plugins < plugins.txt # -t removes trailing newlines
for i in "${plugins[@]}"
do
if [ -d $i ]; then
find $i -name "config.yml" -exec git add -f '{}' \; # All files are ignored, need to force add
fi
done
find . -path './Movecraft/types/*.craft' -exec git add -f '{}' \;
git add -f update.sh download.sh
git commit && git push