Updated gamedatamd5 to print the md5 in a more usable format and added shell script (thanks wowsawce!) for updating gamedata files.
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402319
This commit is contained in:
parent
7314d81947
commit
261023800e
30
tools/daemon/updateGameData.sh
Normal file
30
tools/daemon/updateGameData.sh
Normal file
@ -0,0 +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
|
@ -18,7 +18,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (error == SMCError_Okay)
|
||||
{
|
||||
printf("MD5: %s\n", g_MD5Builder.GetMD5String());
|
||||
printf("%s", g_MD5Builder.GetMD5String());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user