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
21
copy-cfgs.sh
21
copy-cfgs.sh
|
@ -1,13 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
find ./ -type f -name 'server.cfg' -print | while read LINE
|
copy_file()
|
||||||
do
|
{
|
||||||
DIR=$(dirname "$LINE")
|
find ./ -type f -name "$1" -print | while read LINE
|
||||||
cp -va "$LINE" "../$DIR/server.cfg"
|
do
|
||||||
done
|
DIR=$(dirname "$LINE")
|
||||||
|
cp -va "$LINE" "../$DIR/$1"
|
||||||
|
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