From: dms Date: Tue, 12 Dec 2000 15:12:20 +0000 (+0000) Subject: change ~ to ENV{HOME} X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1884d996b65824496227ce089376c306d3c10902;p=infobot.git change ~ to ENV{HOME} git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@196 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/core.pl b/src/core.pl index 4faff2f..7a6ce0b 100644 --- a/src/core.pl +++ b/src/core.pl @@ -45,7 +45,7 @@ $wingaterun = time(); $firsttime = 1; ### CHANGE TO STATIC. -$bot_version = "blootbot 1.0.3 (20000930) -- $^O"; +$bot_version = "blootbot cvs (20001212) -- $^O"; $noreply = "NOREPLY"; ########## @@ -174,6 +174,8 @@ sub setup { &status("Setup: ". &countKeys("factoids") ." factoids."); + $param{tempDir} =~ s#\~/#$ENV{HOME}#; + &status("Initial memory usage: $memusage kB"); } @@ -191,6 +193,15 @@ sub setupConfig { exit 1; } + if ($param{tempDir} =~ s#\~/#$ENV{HOME}#) { + &status("Fixing up tempDir."); + } + + if ($param{tempDir} =~ /~/) { + &ERROR("parameter tempDir still contains tilde."); + exit 1; + } + if (! -d $param{tempDir}) { &status("making $param{tempDir}..."); system("mkdir $param{tempDir}");