+# Check for arguments
+if ( !scalar @ARGV ) {
+ print "Usage: $0 <pack1.fact> [<pack2.fact> <pack2.fact> ...]\n";
+ print "Example: $0 areacodes.fact usazips.fact\n";
+ exit 1;
+}
+
+
+# set any $bot_*_dir var's
+$bot_base_dir = '.';
+$bot_config_dir = 'files/';
+$bot_data_dir = 'files/';
+$bot_state_dir = 'files/';
+$bot_run_dir = '.';
+$bot_src_dir = "$bot_base_dir/src";
+$bot_log_dir = "$bot_base_dir/log";
+$bot_misc_dir = "$bot_base_dir/files";
+$bot_pid = $$;
+
+require "$bot_src_dir/logger.pl";
+require "$bot_src_dir/core.pl";
+require "$bot_src_dir/modules.pl";
+
+# Initialize enough to get DB access
+&setupConfig();
+&loadCoreModules();