# other game directories.
GAMEDIR=game
-update-conf: game/mushcnf.dst game/aliascnf.dst game/restrictcnf.dst game/namescnf.dst
- -@@TOUCH@ game/mushcnf.dst
- -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/mush.cnf game/mushcnf.dst
- -@@TOUCH@ game/aliascnf.dst
- -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/alias.cnf game/aliascnf.dst
- -@@TOUCH@ game/restrictcnf.dst
- -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/restrict.cnf game/restrictcnf.dst
- -@if [ ! -f $(GAMEDIR)/names.cnf ]; then $(CP) game/namescnf.dst $(GAMEDIR)/names.cnf; fi
+update-conf: game/mush.cnf game/alias.cnf game/restrict.cnf game/names.cnf game/restart
$(GAMEDIR)/alias.cnf: game/aliascnf.dst
-@@TOUCH@ game/aliascnf.dst
$(CP) game/namescnf.dst $(GAMEDIR)/names.cnf \
fi
+$(GAMEDIR)/restart: game/restart.dst
+ifeq ("$(shell which bash)", "")
+ @echo "********************************************************************************";
+ @echo "* Restart script has been updated in this distribution. *";
+ @echo "* However, bash has not been installed on your system. *";
+ @echo "* Please cp game/restart.dst to game/restart if you would like our updated *";
+ @echo "* restart script. *";
+ @echo "********************************************************************************";
+else
+ -@@BASH@ utils/checkrestart.sh
+endif
+
+
$(GAMEDIR)/mush.cnf: game/mushcnf.dst
-@@TOUCH@ game/mushcnf.dst
-@@PERL@ utils/update-cnf.pl $(GAMEDIR)/mush.cnf game/mushcnf.dst
--- /dev/null
+#!/bin/bash
+# Many systems are switching to dash are their default shell.. Well.. its syntax breaks us so we need to specify bash.
+
+if test ! -f game/restart ; then
+ echo "Creating restart script from restart.dst";
+ cp game/restart.dst game/restart;
+else
+ read -p "Restart script has changed in this distribution. Should we replace your current restart script with ours?" -n 1;
+ if [[ $REPLY =~ ^[Yy]$ ]];then
+ echo -e "\nSaving your restart script as restart.bup.";
+ cp game/restart game/restart.bup;
+ echo "Moving restart.dst to restart.";
+ cp game/restart.dst game/restart;
+ else
+ echo -e "\nOk.. not copying";
+ fi
+fi
chmod 755 utils/make_access_cnf.sh
chmod 755 utils/update-cnf.pl
chmod 755 utils/update.pl
+chmod 755 utils/checkrestart.sh
# Step 2: create auto-generated source/header files
echo "Generating source and header files..."