root/1.8.3/tags/p5rc1/utils/make_access_cnf.sh

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#
10dir=$1
11
12if [ -z "$dir" ]; then
13  echo "Usage: make_access_cnf.sh <game-directory>"
14  exit 0
15fi
16
17if [ ! -d $dir ]; then
18  echo "No such directory: $dir"
19  exit 0
20fi
21
22if [ -r $dir/lockout.cnf ]; then
23  echo "Processing lockout.cnf."
24  sed -e 's/$/ none/' < $dir/lockout.cnf >> $dir/access.cnf
25else
26  echo "No lockout.cnf found."
27fi
28
29
30if [ -r $dir/sites.cnf ]; then
31  echo "Processing sites.cnf."
32  sed -e 's/$/ !create/' < $dir/sites.cnf >> $dir/access.cnf
33else
34  echo "No sites.cnf found."
35fi
36
37echo "Done."
Note: See TracBrowser for help on using the browser.