streamline cop-cfgs.sh and add motd.txt support
This commit is contained in:
parent
287018e84c
commit
64f447a420
1 changed files with 11 additions and 10 deletions
19
copy-cfgs.sh
19
copy-cfgs.sh
|
@ -1,13 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
find ./ -type f -name 'server.cfg' -print | while read LINE
|
||||
do
|
||||
copy_file()
|
||||
{
|
||||
find ./ -type f -name "$1" -print | while read LINE
|
||||
do
|
||||
DIR=$(dirname "$LINE")
|
||||
cp -va "$LINE" "../$DIR/server.cfg"
|
||||
done
|
||||
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
|
Loading…
Reference in a new issue