fixed erroneous belief that iar and oar are zips; they are tar format instead.
authorChris Koeritz <fred@gruntose.com>
Mon, 10 Sep 2012 01:48:09 +0000 (21:48 -0400)
committerChris Koeritz <fred@gruntose.com>
Mon, 10 Sep 2012 01:48:09 +0000 (21:48 -0400)
removed a few references to TEMP or TMP.  need a major overhaul to refer to TMP
uniformly.

nucleus/library/configuration/variable_tokenizer.h
nucleus/library/processes/process_control.cpp
nucleus/library/processes/rendezvous.cpp
scripts/archival/unpack.sh

index 82b083573bd0a2f643461ecddfa6debc375ea014..34588a661b0df9c3dcddfa5a1c42c44a150e01dc 100644 (file)
@@ -94,7 +94,7 @@ public:
     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
     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
     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
index ce0dbf03185f76ef29d4b08c80ab34eba858e7f2..96485c8cdb18aa6c257906ef4cce9ac204fe243e 100644 (file)
@@ -507,7 +507,7 @@ bool process_control::get_processes_with_toolhelp(process_entry_array &to_fill)
 
 #ifdef __UNIX__
 
 
 #ifdef __UNIX__
 
-#define CLOSE_TMP_FILE { \
+#define CLOSE_TEMPORARY_FILE { \
 /*  continuable_error("process_control", "get_processes_with_ps", error); */ \
   if (output) { \
     fclose(output); \
 /*  continuable_error("process_control", "get_processes_with_ps", error); */ \
   if (output) { \
     fclose(output); \
@@ -528,13 +528,13 @@ bool process_control::get_processes_with_ps(process_entry_array &to_fill)
   int sysret = system(cmd.s());
   if (negative(sysret)) {
 LOG("got negative return from system()!");
   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!");
     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;
     return false;
   }
   const int max_buff = 10000;
@@ -548,7 +548,7 @@ LOG("failed to open process list file!");
     if (size_read > 0)
       accumulator += astring(astring::UNTERMINATED, buff, size_read);
   }
     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()) {
   // parse the string up now.
   bool first_line = true;
   while (accumulator.length()) {
index 3f3385e8e109c064cbc72232ad3cec02c55dd2a2..46545a309e739786783ccf8776c04d412cda2bc4 100644 (file)
@@ -59,10 +59,7 @@ astring unix_rendez_file(const astring &lock_name)
   filename::detooth_filename(clean_name);
   // make sure our target directory exists.
 
   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);
   astring tmp_dir = "/tmp/rendezvous";
 
   mkdir(tmp_dir.observe(), 0777);
index 933f8f0ac7d0101fbe7075acf445e7a67af68576..f5c2aa93a2623158a169b475a280e1685c05f497 100644 (file)
@@ -54,13 +54,16 @@ fi
 if [[ $unpack_file =~ .*\.tar$ \
     || $unpack_file =~ .*\.tar\.gz$ \
     || $unpack_file =~ .*\.tar\.bz2$ \
 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$ \
   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=$?
   unzip $unpack_file &>/dev/null
 fi
 save_err=$?