-
Notifications
You must be signed in to change notification settings - Fork 0
/
mods-md.sh
17 lines (17 loc) · 989 Bytes
/
mods-md.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
# Script to generate a mods.md file for our gist, created by Ainsley
rm /home/server/scripts/files/mods.md
touch /home/server/scripts/files/mods.md
printf '# Survival mods\n```java\n' >> /home/server/scripts/files/mods.md
cd /home/server/survival/server/mods/ && printf '%s\n' *.jar >> /home/server/scripts/files/mods.md
printf '```\n# Creative mods\n```java\n' >> /home/server/scripts/files/mods.md
cd /home/server/creative/server/mods/ && printf '%s\n' *.jar >> /home/server/scripts/files/mods.md
printf '```\n# MCDR Plugins\n```py\n' >> /home/server/scripts/files/mods.md
cd /home/server/survival/plugins/ && printf '%s\n' *.py >> /home/server/scripts/files/mods.md
printf '```\n# carpet.conf\n```properties\n' >> /home/server/scripts/files/mods.md
cat /home/server/survival/server/world/carpet.conf >> /home/server/scripts/files/mods.md
echo '```' >> /home/server/scripts/files/mods.md
cd /home/server/scripts/files
git add .
git commit -m 'Daily mods.md update'
git push