Changeset 17701 for gsdl/trunk/common-src/src/lib
- Timestamp:
- 2008-11-05T15:26:44+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/common-src/src/lib/gdbmclass.cpp
r17680 r17701 28 28 #include "gsdlunicode.h" 29 29 #include "fileutil.h" 30 30 #include "stdlib.h" 31 31 32 32 … … 107 107 //text_t cmd = "gzip --decompress --to-stdout \"" + txtgz_filename + "\""; 108 108 //cmd += " | txt2db \"" + filename + "\""; 109 110 text_t cmd; 111 #ifdef __WIN32__ 112 cmd = "perl -S txtgz-to-gdbm.pl \"" + txtgz_filename + "\" \"" + filename + "\""; 113 #else 114 cmd = "perl txtgz-to-gdbm.pl \"" + txtgz_filename + "\" \"" + filename + "\""; 115 #endif 116 109 110 // Test to make sure Perl is on the path 111 text_t cmd_test = "perl -v"; 112 int rv_test = gsdl_system(cmd_test, true, cerr); 113 if (rv_test != 0) { 114 cerr << "Tried to find Perl. Return exit value of running " 115 << cmd_test <<": "<< rv_test << ", (expected this to be 0)" << endl; 116 cerr << "Check that Perl is set in your environment variable PATH." << endl; 117 cerr << "At present, PATH=" << getenv("PATH") << endl; 118 } 119 120 text_t cmd = "perl -S txtgz-to-gdbm.pl \"" + txtgz_filename + "\" \"" + filename + "\""; 117 121 int rv = gsdl_system(cmd, true, cerr); 118 122 // For some reason, launching this command with gsdl_system() still returns 1 … … 120 124 // we succeeded by looking at whether the output database file was created. 121 125 if (rv != 0) { 122 cerr << " \nWarning, non-zero return value on running command \""126 cerr << "Warning, non-zero return value on running command \"" 123 127 << cmd << "\": " << rv << endl; 124 128 if (!file_exists(filename)) { 125 cerr << "Tried to run command \""<<cmd<<"\", but it failed \n";129 cerr << "Tried to run command \""<<cmd<<"\", but it failed" << endl; 126 130 } 127 131 }
Note:
See TracChangeset
for help on using the changeset viewer.