possible by using the current separator and assignment characters.
E.G.: if the separator is ';' and the assignment character
is '=', then one's string would look something like: @code
- TEMP=c:\tmp; GLOB=c:\glob.exe; .... @endcode
+ state_folder=/home/fred/state; GLOB=/usr/bin/glob.exe; .... @endcode
whitespace is ignored if it's found (1) after a separator and before
the next variable name, (2) after the variable name and before the
assignment character, (3) after the assignment character and before the
#ifdef __UNIX__
-#define CLOSE_TMP_FILE { \
+#define CLOSE_TEMPORARY_FILE { \
/* continuable_error("process_control", "get_processes_with_ps", error); */ \
if (output) { \
fclose(output); \
int sysret = system(cmd.s());
if (negative(sysret)) {
LOG("got negative return from system()!");
- CLOSE_TMP_FILE;
+ CLOSE_TEMPORARY_FILE;
return false;
}
output = fopen(tmpfile.s(), "r");
if (!output) {
LOG("failed to open process list file!");
- CLOSE_TMP_FILE;
+ CLOSE_TEMPORARY_FILE;
return false;
}
const int max_buff = 10000;
if (size_read > 0)
accumulator += astring(astring::UNTERMINATED, buff, size_read);
}
- CLOSE_TMP_FILE;
+ CLOSE_TEMPORARY_FILE;
// parse the string up now.
bool first_line = true;
while (accumulator.length()) {
filename::detooth_filename(clean_name);
// make sure our target directory exists.
- // this choice is only user specific.
-// astring tmp_dir = portable::env_string("TMP") + "/rendezvous";
-
- // this choice uses a system-wide location.
+ // use a system-wide location for rendezvous state files.
astring tmp_dir = "/tmp/rendezvous";
mkdir(tmp_dir.observe(), 0777);
if [[ $unpack_file =~ .*\.tar$ \
|| $unpack_file =~ .*\.tar\.gz$ \
|| $unpack_file =~ .*\.tar\.bz2$ \
- || $unpack_file =~ .*\.tgz$ ]]; then
+ || $unpack_file =~ .*\.iar$ \
+ || $unpack_file =~ .*\.oar$ \
+ || $unpack_file =~ .*\.tgz$ \
+ ]]; then
tar -xf $unpack_file &>/dev/null
elif [[ $unpack_file =~ .*\.zip$ \
|| $unpack_file =~ .*\.odt$ \
|| $unpack_file =~ .*\.jar$ \
- || $unpack_file =~ .*\.iar$ \
- || $unpack_file =~ .*\.oar$ ]]; then
+ || $unpack_file =~ .*\.war$ \
+ ]]; then
unzip $unpack_file &>/dev/null
fi
save_err=$?