So, the first time I tried to do Merc 2.2 cleaned it wouldn't even make. After purging it from my computer and trying again, voila, Merc 22 makes successfully. I type startup &… …. says that startup is not a command. Alright, so I try sh startup & and get…
$ startup: line 7: syntax error near unexpected token 'set' startup: line 7: 'if ( "$1" != "" ) set port="$1"
Here's the startup file:
#! /bin/csh -f # Written by Furey. # With additions from Tony.
# Set the port number. set port = 9500 if ( "$1" != "" ) set port="$1"
# Change to area directory. cd ../area
# Set limits. nohup limit stack 1024k if ( -e shutdown.txt ) rm -f shutdown.txt
while ( 1 ) # If you want to have logs in a different directory, # change the 'set logfile' line to reflect the directory name. set index = 1000 while ( 1 ) set logfile = ../log/$index.log if ( ! -e $logfile ) break @ index++ end
# Record initial charges charges >> $logfile
# Run merc. # Check if already running set matches = `netstat -a | grep ":$port " | grep -c LISTEN` if ( $matches >= 1 ) then # Already running echo MUD Already running. exit 0 endif ../src/merc $port >&! $logfile
# Restart, giving old connections a chance to die. if ( -e shutdown.txt ) then rm -f shutdown.txt exit 0 endif sleep 15 end
I'm worried that if it has errors that early on that it will have more, and I'm not sure how to fix them all.
No clue what csh is. It looks familiar to an option I selected for the Cygwin install though. I should probably just have done a complete install of Cygwin but it was already a long install as it was, I'm not sure I can go through that pain again…
09 Jan, 2009, David Haley wrote in the 4th comment:
Votes: 0
You probably need to install tcsh. Note that you don't have to reinstall all of Cygwin to get missing components.
I'm sure their site explains how to install missing components?
Yeah right on the front page. Pretty nigh impossible to miss methinks.
'startup' doesn't work because on unix your local directory is not searched by default 'sh startup' invokes bash shell. it's a c-shell script './startup' is correct.
tcsh is a substitute for csh. Not to worry as its installation creates a csh symlink
Is it installed? Following command should check: cygcheck -c | grep tcsh tcsh 6.15.00-4 OK
$ startup: line 7: syntax error near unexpected token 'set'
startup: line 7: 'if ( "$1" != "" ) set port="$1"
Here's the startup file:
I'm worried that if it has errors that early on that it will have more, and I'm not sure how to fix them all.