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
|
#!/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
|
|
Loading…
Reference in a new issue