cygwin is super uncooperative with certain types of dos paths.
\r
// sole purpose of this is to make the lib be generated,\r
// even though we currently do not have any code that lives inside it.\r
+\r
+\r
+int __private_private_bogus_placeholder_xj27_qx19() { return 32; }\r
byte_filer::byte_filer()
: _handle(new file_hider),
- _filename(new astring),
+ _filename(new filename),
_auto_close(true)
{}
-byte_filer::byte_filer(const astring &filename, const astring &perms)
+byte_filer::byte_filer(const astring &fname, const astring &perms)
: _handle(new file_hider),
- _filename(new astring),
+ _filename(new filename),
_auto_close(true)
-{ open(filename, perms); }
+{ open(fname, perms); }
-byte_filer::byte_filer(const char *filename, const char *perms)
+byte_filer::byte_filer(const char *fname, const char *perms)
: _handle(new file_hider),
- _filename(new astring),
+ _filename(new filename),
_auto_close(true)
-{ open(filename, perms); }
+{ open(fname, perms); }
byte_filer::byte_filer(bool auto_close, void *handle)
: _handle(new file_hider),
- _filename(new astring),
+ _filename(new filename),
_auto_close(auto_close)
{
if (handle) {
byte_filer::~byte_filer() { close(); WHACK(_handle); WHACK(_filename); }
-astring byte_filer::filename() const { return *_filename; }
+astring byte_filer::name() const { return _filename->raw(); }
size_t byte_filer::file_size_limit() { return BTFL_FILE_TELL_LIMIT; }
-bool byte_filer::open(const astring &filename, const astring &perms)
+bool byte_filer::open(const astring &fname, const astring &perms)
{
close();
_auto_close = true; // reset since we know we're opening this.
- *_filename = filename;
+ _filename->reset(fname);
#ifndef __WIN32__
- _handle->fp = filename.t()? fopen(filename.s(), perms.s()) : NIL;
+ _handle->fp = _filename->raw().t()? fopen(_filename->raw().s(), perms.s()) : NIL;
#else
- _handle->fp = filename.t()? _wfopen((wchar_t *)(UTF16 *)transcode_to_utf16(filename),
+ _handle->fp = _filename->raw().t()? _wfopen((wchar_t *)(UTF16 *)transcode_to_utf16(_filename->raw()),
(wchar_t *)(UTF16 *)transcode_to_utf16(perms)) : NIL;
#ifdef DEBUG_BYTE_FILER
if (!_handle->fp)
wprintf((wchar_t *)(UTF16 *)transcode_to_utf16("could not open: %ls\n"),
- (wchar_t *)(UTF16 *)transcode_to_utf16(filename));
+ (wchar_t *)(UTF16 *)transcode_to_utf16(_filename->raw()));
#endif
#endif
void byte_filer::close()
{
- *_filename = "";
+ _filename->reset("");
if (_auto_close && _handle->fp) fclose(_handle->fp);
_handle->fp = NIL;
}
#include <basis/byte_array.h>
#include <basis/definitions.h>
+#include "filename.h"
+
namespace filesystem {
// forward declarations.
//!< constructs an object that doesn't access a file yet.
/*!< use open() to make the object valid. */
- byte_filer(const basis::astring &filename, const basis::astring &permissions);
- //!< opens a file "filename" as specified in "permissions".
+ byte_filer(const basis::astring &fname, const basis::astring &permissions);
+ //!< opens a file "fname" as specified in "permissions".
/*!< these are identical to the standard I/O permissions:
- "r" - opens text file for reading.
a "b" can be added to the end of these to indicate a binary file should
be used instead of a text file. */
- byte_filer(const char *filename, const char *permissions);
+ byte_filer(const char *fname, const char *permissions);
//!< synonym for above but takes char pointers.
byte_filer(bool auto_close, void *opened);
//!< returns the maximum size that seek and length can support.
/*!< use the huge_file class if you need to exceed the stdio limits. */
- bool open(const basis::astring &filename, const basis::astring &permissions);
- //!< opens a file with "filename" and "permissions" as in the constructor.
+ bool open(const basis::astring &fname, const basis::astring &permissions);
+ //!< opens a file with "fname" and "permissions" as in the constructor.
/*!< if a different file had already been opened, it is closed. */
void close();
//!< shuts down the open file, if any.
/*!< open() will have to be invoked before this object can be used again. */
- basis::astring filename() const;
- //!< returns the filename that this was opened with.
+ basis::astring name() const;
+ //!< returns the file name that the object is operating on.
bool good();
//!< returns true if the file seems to be in the appropriate desired state.
private:
file_hider *_handle; //!< the standard I/O support that we rely upon.
- basis::astring *_filename; //!< holds onto our current filename.
+ filename *_filename; //!< holds onto our current filename.
bool _auto_close; //!< true if the object should close the file.
// not to be called.
bool filename::unlink() const { return ::unlink(observe()) == 0; }
+void filename::reset(const astring &name) {
+ *this = name;
+ _had_directory = true; // until we know better.
+ canonicalize();
+}
+
astring filename::null_device()
{
#ifdef __WIN32__
status_info fill;
if (!get_info(&fill))
return false;
+#if defined(__WIN32__) || defined(__VMS__)
+//hmmm: is there a corresponding set of functions for windows, where applicable?
+ bool weird = false;
+#else
bool weird = S_ISCHR(fill.st_mode)
|| S_ISBLK(fill.st_mode)
|| S_ISFIFO(fill.st_mode)
|| S_ISSOCK(fill.st_mode);
+#endif
return !weird;
}
/*!< this means that not only was the pathname parsed and found valid,
but the file actually exists. */
+ void reset(const basis::astring &name);
+ //!< changes the file name held by the object.
+
const basis::astring &raw() const;
//!< returns the astring that we're holding onto for the path.
basis::astring &raw();
// something malfunctioned. we should always be able to get back to
// the last good size we found if the file is static.
LOG(a_sprintf("failed to seek back to best highest %.0f on ",
- best_highest) + _real_file->filename());
+ best_highest) + _real_file->name());
// try to repair our ideas about the file by starting the process
// over.
//hmmm: count the number of times restarted and bail after N.
// the heck with this. we can't even go back to the start. this
// file seems to be screwed up now.
LOG(astring("failed to seek back to start of file! on ")
- + _real_file->filename());
+ + _real_file->name());
return 0;
}
// reset the rest of the positions for our failed attempt to return
modfile.truncate(); // chop off anything left from previous versions.
if (do_logging) {
// let the people know about this...
- filename dirbase = filename(modfile.filename()).dirname().basename();
- filename just_base = filename(modfile.filename()).basename();
+ filename dirbase = filename(modfile.name()).dirname().basename();
+ filename just_base = filename(modfile.name()).basename();
program_wide_logger::get().log(astring(" patching: ") + dirbase
+ "/" + just_base, basis::ALWAYS_PRINT);
}
--- /dev/null
+//need header here.
+
+// make ms be quiet about strncat.
+#define _CRT_SECURE_NO_WARNINGS
+
+#ifdef _MSC_VER
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+// turns the cygwin name format into a usable windos filename.
+char *translate_cygwin(char *fname)
+{
+ int oldlen = strlen(fname);
+ if (!strncmp(fname, "/cygdrive/", 10) && (oldlen > 10) ) {
+ // in the first case the filename has /cygdrive in it, right at the front.
+ char *newprefix = (char *)malloc(oldlen);
+ // build the drive letter first.
+ newprefix[0] = fname[10];
+ newprefix[1] = ':';
+ newprefix[2] = '\0';
+ // concatenate the filename without cygdrive in it.
+ strncat(newprefix, fname + 11, oldlen - 11 + 1); // one extra for null char.
+ return newprefix; // mem leak here; cannot be helped for quick fix using functional style.
+ } else if ( (fname[0] == '-') && (oldlen > 12)
+ && (!strncmp(fname + 2, "/cygdrive/", 10) ) {
+ // in the second case we are looking for command line options. this code handles a parameter
+ // that starts with a single dash and has a single flag character after that.
+ char *newprefix = (char *)malloc(oldlen);
+ newprefix[0] = fname[0];
+ newprefix[1] = fname[1];
+ newprefix[2] = fname[12];
+ newprefix[3] = ':';
+ newprefix[4] = '\0';
+ // now concatenate the useful filename portion, offset by the flag found.
+ strncat(newprefix, fname + 13, oldlen - 13 + 1); // one extra for null char.
+ return newprefix;
+ } else {
+ return fname;
+ }
+}
+
+
+function dossify_and_run_commands()
+{
+ declare -a darc_commands=()
+
+ for i in "$@"; do
+ # we only mess with the command line on windows.
+ if [ "$OS" == "Windows_NT" ]; then
+ if [[ "$i" =~ ^-[a-zA-z][/\"].* ]]; then
+#echo matched on our pattern for parameters
+ flag="${i:0:2}"
+ filename="$(unix_to_dos_path ${i:2})"
+
+#echo "first two chars are $flag"
+#echo "last after that are $filename"
+#combined="$flag$filename"
+#echo combined is $combined
+
+ darc_commands+=("$flag$filename")
+ else
+ darc_commands+=($(unix_to_dos_path $i))
+ fi
+ else
+ darc_commands+=("$i")
+ fi
+ done
+
+
+
+int main(int argc, char *argv[])
+{
+ for (int i = 1; i < argc; i++) {
+ printf("%s", translate_cygwin(argv[i]));
+ }
+ return 0;
+}
+
ifeq "$(OMIT_VERSIONS)" ""
SOURCE += clamtools_version.rc
endif
-TARGETS = value_tagger.exe version_stamper.exe vsts_version_fixer.exe write_build_config.exe
+TARGETS = cygwin_fixer.exe value_tagger.exe version_stamper.exe vsts_version_fixer.exe write_build_config.exe
include cpp/rules.def
byte_filer build_file(fname, "r");
if (!build_file.good()) {
- non_continuable_error(class_name(), build_file.filename(),
+ non_continuable_error(class_name(), build_file.name(),
"Could not find the build configuration; is FEISTY_MEOW_DIR set?");
}
byte_array full_config;
build_number += ".";
build_number += temp_ini.load("version", "build", "");
if (build_number.equal_to("...")) {
- non_continuable_error(class_name(), build_file.filename(),
+ non_continuable_error(class_name(), build_file.name(),
"Could not read the build number; is build parameter file malformed?");
}
byte_filer build_header(filename, "wb");
if (!build_header.good())
non_continuable_error(static_class_name(), func, astring("failed to create "
- "build header file in ") + build_header.filename());
+ "build header file in ") + build_header.name());
build_header.write(new_contents);
LOG(astring(static_class_name()) + ": wrote config to "
- + build_header.filename());
+ + build_header.name());
} else {
// nothing has changed.
// LOG(astring(static_class_name()) + ": config already up to date in "
byte_filer ini(fname, "r");
if (!ini.good())
non_continuable_error(static_class_name(), func, astring("failed to open "
- "build configuration file for reading at ") + ini.filename());
+ "build configuration file for reading at ") + ini.name());
//hmmm: parameterize the build ini thing above!
// now we build strings that represents the output files we want to create.
struct sigaction sig_act;
#endif /* USGISH */
+// turns the cygwin name format into a usable windos filename.
+char *translate_cygwin(char *fname)
+{
+ if (!strncmp(fname, "/cygdrive/", 10)) {
+ int oldlen = strlen(fname);
+ char *newprefix = (char *)malloc(oldlen); // at least long enough.
+ newprefix[0] = fname[10];
+ newprefix[1] = ':';
+ newprefix[2] = '\0';
+ strncat(newprefix, fname + 11, oldlen - 11 + 1); // one extra for null char.
+printf("translate cygwin: new filename is %s\n", newprefix);
+ return newprefix; // ignoring mem leak here. cannot be helped for quicky fix.
+ } else return fname;
+}
+
/* fatty boombalatty, and wrong idea here.
// adds any subdirectories under dirname into the list of
char quotechar = '\0';
nargc = 1;
- if ((afd = open(argv[1]+1, O_RDONLY)) < 0)
- fatalerr("cannot open \"%s\"\n", argv[1]+1);
+ if ((afd = open(translate_cygwin(argv[1]+1), O_RDONLY)) < 0)
+ fatalerr("cannot open \"%s\"\n", translate_cygwin(argv[1]+1));
fstat(afd, &ast);
args = (char *)malloc(ast.st_size + 2);
if ((ast.st_size = read(afd, args, ast.st_size)) < 0)
objprefix = argv[0];
} else
objprefix = argv[0]+2;
+ objprefix = translate_cygwin(objprefix);
break;
case 'v':
if (endmarker) break;
struct stat st;
content = (struct filepointer *)malloc(sizeof(struct filepointer));
- content->f_name = strdup(file);
+ content->f_name = strdup(translate_cygwin(file));
if ((fd = open(file, O_RDONLY)) < 0) {
- warning("cannot open \"%s\"\n", file);
+ warning("cannot open \"%s\"\n", translate_cygwin(file));
content->f_p = content->f_base = content->f_end = (char *)malloc(1);
*content->f_p = '\0';
return(content);
if (content->f_base == NULL)
fatalerr("cannot allocate mem\n");
if ((st.st_size = read(fd, content->f_base, st.st_size)) < 0)
- fatalerr("failed to read %s\n", file);
+ fatalerr("failed to read %s\n", translate_cygwin(file));
close(fd);
content->f_len = st.st_size+1;
content->f_p = content->f_base;
}
else
stat(makefile, &st);
- if ((fdin = fopen(makefile, "r")) == NULL)
- fatalerr("cannot open \"%s\"\n", makefile);
+ if ((fdin = fopen(translate_cygwin(makefile), "r")) == NULL)
+ fatalerr("cannot open \"%s\"\n", translate_cygwin(makefile));
sprintf(backup, "%s.bak", makefile);
unlink(backup);
#if defined(WIN32) || defined(__EMX__) || defined(__OS2__)
fclose(fdin);
#endif
- if (rename(makefile, backup) < 0)
- fatalerr("cannot rename %s to %s\n", makefile, backup);
+ if (rename(translate_cygwin(makefile), translate_cygwin(backup)) < 0)
+ fatalerr("cannot rename %s to %s\n", translate_cygwin(makefile), translate_cygwin(backup));
#if defined(WIN32) || defined(__EMX__) || defined(__OS2__)
- if ((fdin = fopen(backup, "r")) == NULL)
- fatalerr("cannot open \"%s\"\n", backup);
+ if ((fdin = fopen(translate_cygwin(backup), "r")) == NULL)
+ fatalerr("cannot open \"%s\"\n", translate_cygwin(backup));
#endif
- if ((fdout = freopen(makefile, "w", stdout)) == NULL)
- fatalerr("cannot open \"%s\"\n", backup);
+ if ((fdout = freopen(translate_cygwin(makefile), "w", stdout)) == NULL)
+ fatalerr("cannot open \"%s\"\n", translate_cygwin(backup));
len = int(strlen(line));
while (!found && fgets(buf, BUFSIZ, fdin)) {
if (*buf == '#' && strncmp(line, buf, len) == 0)
export VIS_STU_ROOT := $(shell $(SHELL) $(CLAM_DIR)/cpp/ms_root_dir.sh )
endif
ifneq "$(VIS_STU_ROOT)" ""
- export COMPILER_ROOT_DIR = $(VIS_STU_ROOT)/vc
+ export COMPILER_ROOT_DIR = $(VIS_STU_ROOT)/VC
endif
ifeq "$(COMPILER_ROOT_DIR)" ""
HOSEUP = $(shell echo The compiler directory is not set. Please define the environment variable)
export PDB_DIR = $(TARGETS_DIR)
# set these way up here so we can override them later.
- CC = bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/cl
- LINK_TOOL = bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/link
+ CC = $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/cl.exe
+ LINK_TOOL = $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/link.exe
# This is needed to protect against the use of 64-bit time_t structure
# on windows. We are casting to time_t from a 32-bit structure.
# set up the feisty_meow dir.
pushd "$CORE_SCRIPTS_DIR/../.." &>/dev/null
+source "$CORE_SCRIPTS_DIR/functions.sh"
export FEISTY_MEOW_DIR="$(pwd)"
popd &>/dev/null
}
# switches from a /X/path form to an X:/ form. this also processes cygwin paths.
- function msys_to_dos_path() {
- # we always remove dos slashes in favor of forward slashes.
- echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/'
+ function unix_to_dos_path() {
+ # we usually remove dos slashes in favor of forward slashes.
+ if [ ! -z "$SERIOUS_SLASH_TREATMENT" ]; then
+ # unless this flag is set, in which case we force dos slashes.
+ echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' | sed -e 's/\//\\/g'
+ else
+ echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/'
+ fi
}
# switches from an X:/ form to an /X/path form.
- function dos_to_msys_path() {
+ function dos_to_unix_path() {
# we always remove dos slashes in favor of forward slashes.
echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\([a-zA-Z]\):\/\(.*\)/\/\1\/\2/'
}
# set the path for locating applications. this is done after any
# potential overrides from the user.
- #export PATH="$(dos_to_msys_path $BINDIR):$(dos_to_msys_path $FEISTY_MEOW_GENERATED):$PATH:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/lib:/usr/games:/usr/bin:."
+ #export PATH="$(dos_to_unix_path $BINDIR):$(dos_to_unix_path $FEISTY_MEOW_GENERATED):$PATH:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/lib:/usr/games:/usr/bin:."
export PATH="$FEISTY_MEOW_GENERATED:$PATH:/sbin:."
###noise! :/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/lib:/usr/games:/usr/bin:.
source "$BUILD_SCRIPTS_DIR/../core/launch_feisty_meow.sh"
fi
+source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
+
+# translate to dos format if there's a cygdrive in there; otherwise microsoft's tools
+# will hose up completely due to unknown paths.
+export FEISTY_MEOW_DIR="$(unix_to_dos $FEISTY_MEOW_DIR)"
+
# load in build variables based on our deduced paths.
source "$BUILD_SCRIPTS_DIR/build_variables.sh" "$BUILD_SCRIPTS_DIR/build_variables.sh"
promote value_tagger # tool scrambles through headers to standardize outcomes.
promote version_stamper # used for version stamping.
promote vsts_version_fixer # used for version stamping.
- promote write_build_config # creates a header of build-specific config info.
+ promote write_build_config # creates a header of build-specific config info.
+ promote cygwin_fixer # translates cygwin paths into dos-style equivalents.
popd &>/dev/null
fi
# synonym to make other builds happy.
export BUILDER_DIR="$BUILDING_HIERARCHY"
-# guess the current platform.
-#IS_UNIX=$(uname | grep -i linux)
-#if [ -z "$IS_UNIX" ]; then IS_UNIX=$(uname | grep -i unix); fi
-#if [ -z "$IS_UNIX" ]; then IS_UNIX=$(uname | grep -i darwin); fi
-#IS_DOS=$(uname | grep -i ming)
-#if [ -z "$IS_DOS" ]; then IS_DOS=$(uname | grep -i cygwin); fi
-
# set some clam parameters for compilation. if the script can't guess the
# right configuration, then you will need to set them in the last 'else'
# below.
echo "[FEISTY_MEOW_DIR is $FEISTY_MEOW_DIR]"
fi
+if [ "$OPERATING_SYSTEM" == "WIN32" ]; then
+ # harsh on the paths and make them use backwards slashes.
+ export SERIOUS_SLASH_TREATMENT=true
+fi
+
# new BUILD_TOP variable points at the utter top-most level of any files
# in the building hierarchy.
export BUILD_TOP="$FEISTY_MEOW_DIR"
#:$FrameworkSDKDir/lib"
# convert framework dir back or things yell like hell.
-export FrameworkDir=$(msys_to_dos_path $FrameworkDir)
+export FrameworkDir=$(unix_to_dos_path $FrameworkDir)
# the redirection of stderr to null is to get around an obnoxious cygwin
# warning that seems to be erroneously bitching about backslashes.
-# mark this as executable because we will need it.
-#chmod 755 $FEISTY_MEOW_SCRIPTS/generator/wrapdoze.sh
-
# convert all other relevant paths back to dos form, or visual studio barfs.
-#export BUILD_SCRIPTS_DIR=$(msys_to_dos_path $BUILD_SCRIPTS_DIR)
-#export BUILDING_HIERARCHY=$(msys_to_dos_path $BUILDING_HIERARCHY)
-#export BUILDER_DIR=$(msys_to_dos_path $BUILDER_DIR)
-#export BUILD_TOP=$(msys_to_dos_path $BUILD_TOP)
-#export PRODUCTION_DIR=$(msys_to_dos_path $PRODUCTION_DIR)
-#export LOGS_DIR=$(msys_to_dos_path $LOGS_DIR)
-#export TOOL_SOURCES=$(msys_to_dos_path $TOOL_SOURCES)
-#export BINARY_DIR=$(msys_to_dos_path $BINARY_DIR)
-#export TARGETS_DIR=$(msys_to_dos_path $TARGETS_DIR)
-#export INTERMEDIATE_EXE_DIR=$(msys_to_dos_path $INTERMEDIATE_EXE_DIR)
-#export WASTE_DIR=$(msys_to_dos_path $WASTE_DIR)
+#export BUILD_SCRIPTS_DIR=$(unix_to_dos_path $BUILD_SCRIPTS_DIR)
+#export BUILDING_HIERARCHY=$(unix_to_dos_path $BUILDING_HIERARCHY)
+#export BUILDER_DIR=$(unix_to_dos_path $BUILDER_DIR)
+#export BUILD_TOP=$(unix_to_dos_path $BUILD_TOP)
+#export PRODUCTION_DIR=$(unix_to_dos_path $PRODUCTION_DIR)
+#export LOGS_DIR=$(unix_to_dos_path $LOGS_DIR)
+#export TOOL_SOURCES=$(unix_to_dos_path $TOOL_SOURCES)
+#export BINARY_DIR=$(unix_to_dos_path $BINARY_DIR)
+#export TARGETS_DIR=$(unix_to_dos_path $TARGETS_DIR)
+#export INTERMEDIATE_EXE_DIR=$(unix_to_dos_path $INTERMEDIATE_EXE_DIR)
+#export WASTE_DIR=$(unix_to_dos_path $WASTE_DIR)
##############
#!/bin/bash
-source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
+source $FEISTY_MEOW_SCRIPTS/core/functions.sh
-declare -a commands=()
+function dossify_and_run_commands()
+{
+ declare -a darc_commands=()
-for i in "$@"; do
- # we only mess with the command line on windows.
- if [ "$OS" == "Windows_NT" ]; then
- commands+=($(msys_to_dos_path $i))
- else
- commands+=("$i")
- fi
-done
+ for i in "$@"; do
+ # we only mess with the command line on windows.
+ if [ "$OS" == "Windows_NT" ]; then
+ if [[ "$i" =~ ^-[a-zA-z][/\"].* ]]; then
+#echo matched on our pattern for parameters
+ flag="${i:0:2}"
+ filename="$(unix_to_dos_path ${i:2})"
-# echo commands are now:
-# for i in "${commands[@]}"; do
-# echo $i
-# done
+#echo "first two chars are $flag"
+#echo "last after that are $filename"
+#combined="$flag$filename"
+#echo combined is $combined
+
+ darc_commands+=("$flag$filename")
+ else
+ darc_commands+=($(unix_to_dos_path $i))
+ fi
+ else
+ darc_commands+=("$i")
+ fi
+ done
-# now actually run the possibly chewed command.
-"${commands[@]}"
+#temp!
+ echo commands are now: >>/tmp/wrapdoze.log
+ for i in "${darc_commands[@]}"; do
+ echo $i >>/tmp/wrapdoze.log
+ done
+#end temp
+ # now actually run the possibly chewed command.
+ "${darc_commands[@]}"
+}
+
+dossify_and_run_commands "$@"