Skip to content

Commit

Permalink
Important fix to getVersion () to eliminate tmp file buildup
Browse files Browse the repository at this point in the history
  • Loading branch information
TnTBass committed Apr 1, 2012
1 parent 156096f commit 23d277b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/scripts/functions.sh
Expand Up @@ -555,8 +555,10 @@ quitFunction () {
# Get Craftbukkit Version Info
getVersion () {
if [[ $MCPID ]]; then
buildtmp=`mktemp "/tmp/build-$abmid.XXXXXX"`
grep "This server is running CraftBukkit" $slog |tail -1 | awk '{print $10, $11, $12}' > $buildtmp
if [[ ! -f $buildtmp ]]; then
buildtmp=`mktemp "/tmp/build-$abmid.XXXXXX"`
grep "This server is running CraftBukkit" $slog |tail -1 | awk '{print $10, $11, $12}' > $buildtmp
fi
build=`cat $buildtmp`
fi
}
Expand Down

0 comments on commit 23d277b

Please sign in to comment.