streamline cop-cfgs.sh and add motd.txt support

This commit is contained in:
Marco Cawthorne 2023-11-18 10:22:21 -08:00
parent 287018e84c
commit 64f447a420
Signed by: eukara
GPG key ID: CE2032F0A2882A22

View file

@ -1,13 +1,14 @@
#!/bin/sh
find ./ -type f -name 'server.cfg' -print | while read LINE
do
DIR=$(dirname "$LINE")
cp -va "$LINE" "../$DIR/server.cfg"
done
copy_file()
{
find ./ -type f -name "$1" -print | while read LINE
do
DIR=$(dirname "$LINE")
cp -va "$LINE" "../$DIR/$1"
done
}
find ./ -type f -name 'mapcycle.txt' -print | while read LINE
do
DIR=$(dirname "$LINE")
cp -va "$LINE" "../$DIR/mapcycle.txt"
done
copy_file server.cfg
copy_file mapcycle.txt
copy_file motd.txt