|
Revision 258, 0.7 KB
(checked in by pennmush, 3 years ago)
|
|
PennMUSH 1.7.3p0 Archival
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | # |
|---|
| 3 | # Take the file game/lockout.cnf and game/sites.cnf and combine them, |
|---|
| 4 | # appending the result to game/access.cnf |
|---|
| 5 | # |
|---|
| 6 | # Usage: |
|---|
| 7 | # make_access_cnf.sh game-directory |
|---|
| 8 | # (Commonly called by 'make access', which runs make_access_cnf.sh game) |
|---|
| 9 | # |
|---|
| 10 | dir=$1 |
|---|
| 11 | |
|---|
| 12 | if [ -z "$dir" ]; then |
|---|
| 13 | echo "Usage: make_access_cnf.sh <game-directory>" |
|---|
| 14 | exit 0 |
|---|
| 15 | fi |
|---|
| 16 | |
|---|
| 17 | if [ ! -d $dir ]; then |
|---|
| 18 | echo "No such directory: $dir" |
|---|
| 19 | exit 0 |
|---|
| 20 | fi |
|---|
| 21 | |
|---|
| 22 | if [ -r $dir/lockout.cnf ]; then |
|---|
| 23 | echo "Processing lockout.cnf." |
|---|
| 24 | sed -e 's/$/ none/' < $dir/lockout.cnf >> $dir/access.cnf |
|---|
| 25 | else |
|---|
| 26 | echo "No lockout.cnf found." |
|---|
| 27 | fi |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | if [ -r $dir/sites.cnf ]; then |
|---|
| 31 | echo "Processing sites.cnf." |
|---|
| 32 | sed -e 's/$/ !create/' < $dir/sites.cnf >> $dir/access.cnf |
|---|
| 33 | else |
|---|
| 34 | echo "No sites.cnf found." |
|---|
| 35 | fi |
|---|
| 36 | |
|---|
| 37 | echo "Done." |
|---|