Made restart.dst handle Windows line-endings better
authorAri Johnson <ari@cobramush.org>
Wed, 21 Feb 2007 00:36:11 +0000 (00:36 +0000)
committerAri Johnson <ari@cobramush.org>
Wed, 21 Feb 2007 00:36:11 +0000 (00:36 +0000)
game/restart.dst

index e6c4a1633588ceace2e5665a4a6ae0905e8e61ba..9ccdf472a7ff5d8168c771aff0cd7c706555cb7d 100644 (file)
@@ -118,10 +118,10 @@ fi
 #
 # Read the cnf file and set some variables.
 #
-INDB=`egrep "^input_database" $CONF_FILE | sed "s/.*[  ][      ]*.*\/\(.*\)/\1/"`
-OUTDB=`egrep "^output_database" $CONF_FILE | sed "s/.*[        ][      ]*.*\/\(.*\)/\1/"`
-PANICDB=`egrep "^crash_database" $CONF_FILE | sed "s/.*[       ][      ]*.*\/\(.*\)/\1/"`
-PANICDIR=`egrep "^crash_database" $CONF_FILE | sed "s/.*[      ][      ]*\(.*\)\/.*/\1/"`
+INDB=`egrep "^input_database" $CONF_FILE | sed "s/.*[  ][      ]*.*\/\(.*\)/\1/" | sed 's/\r$//'`
+OUTDB=`egrep "^output_database" $CONF_FILE | sed "s/.*[        ][      ]*.*\/\(.*\)/\1/" | sed 's/\r$//'`
+PANICDB=`egrep "^crash_database" $CONF_FILE | sed "s/.*[       ][      ]*.*\/\(.*\)/\1/" | sed 's/\r$//'`
+PANICDIR=`egrep "^crash_database" $CONF_FILE | sed "s/.*[      ][      ]*\(.*\)\/.*/\1/" | sed 's/\r$//'`
 COMPRESSOR="cat"
 SUFFIX=""
 
@@ -129,8 +129,8 @@ SUFFIX=""
 egrep -s "^compress_program[   ]*[A-Za-z0-9]" $CONF_FILE
 nocompress=$?
 if [ "$nocompress" -eq 0 ]; then
-    COMPRESSOR=`egrep "^compress_program" $CONF_FILE | sed "s/[^       ]*[     ]*\(.*\)/\1/"`
-    SUFFIX=`egrep "^compress_suffix" $CONF_FILE | sed "s/[^    ]*[     ]*\(.*\)/\1/"`
+    COMPRESSOR=`egrep "^compress_program" $CONF_FILE | sed "s/[^       ]*[     ]*\(.*\)/\1/" | sed 's/\r$//'`
+    SUFFIX=`egrep "^compress_suffix" $CONF_FILE | sed "s/[^    ]*[     ]*\(.*\)/\1/" | sed 's/\r$//'`
 fi