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 #!/bin/sh
find ./ -type f -name 'server.cfg' -print | while read LINE copy_file()
do {
find ./ -type f -name "$1" -print | while read LINE
do
DIR=$(dirname "$LINE") DIR=$(dirname "$LINE")
cp -va "$LINE" "../$DIR/server.cfg" cp -va "$LINE" "../$DIR/$1"
done done
}
find ./ -type f -name 'mapcycle.txt' -print | while read LINE copy_file server.cfg
do copy_file mapcycle.txt
DIR=$(dirname "$LINE") copy_file motd.txt
cp -va "$LINE" "../$DIR/mapcycle.txt"
done