From 853b080aa412cd5334915874d22c914dcb6217f3 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Tue, 1 Jul 2008 09:24:22 +0000 Subject: [PATCH] Updated shell script to remove windows line endings --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402320 --- tools/daemon/updateGameData.sh | 60 +++++++++++++++++----------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tools/daemon/updateGameData.sh b/tools/daemon/updateGameData.sh index 72099370..4eaaccbc 100644 --- a/tools/daemon/updateGameData.sh +++ b/tools/daemon/updateGameData.sh @@ -1,30 +1,30 @@ -#!/bin/bash - -FILENAME="" -SUMSFILE="" - -if [ -n "$1" ] -then - FILENAME="$1.txt" - SUMSFILE="$1.sums" -else - echo "Need to specify a gamedata filename" - exit -1 -fi - - -if [ -s $FILENAME ] -then - #run ./gamedatamd5 on this file and pipe output+filename into $1.sums - MD5=`./gamedatamd5 $FILENAME` - #need to stop here if gamedatamd5 failed. (returns -1 and prints to stderr) - echo "$MD5" > "$SUMSFILE" - echo "$FILENAME" >> "$SUMSFILE" - ln -s "$SUMSFILE" "$MD5" - - exit 0 -fi - -echo "File $FILENAME not found!" - -exit -1 \ No newline at end of file +#!/bin/bash + +FILENAME="" +SUMSFILE="" + +if [ -n "$1" ] +then + FILENAME="$1.txt" + SUMSFILE="$1.sums" +else + echo "Need to specify a gamedata filename" + exit -1 +fi + + +if [ -s $FILENAME ] +then + #run ./gamedatamd5 on this file and pipe output+filename into $1.sums + MD5=`./gamedatamd5 $FILENAME` + #need to stop here if gamedatamd5 failed. (returns -1 and prints to stderr) + echo "$MD5" > "$SUMSFILE" + echo "$FILENAME" >> "$SUMSFILE" + ln -s "$SUMSFILE" "$MD5" + + exit 0 +fi + +echo "File $FILENAME not found!" + +exit -1