- local appdir="$1"; shift
- if [ ! -d "$appdir" ]; then
- echo "Creating the apps directory: $appdir" >> "$SSM_LOG_FILE"
- mkdir "$appdir"
- test_or_die "Making apps directory when not already present"
+ local temp_app_dirname="$1"; shift
+
+echo new call to auto conf func...
+ autoconfigure_paths "$temp_app_dirname"
+echo after call to auto conf func...
+
+ if [ -z "$BASE_APPLICATION_PATH" ]; then
+echo fix this: we had no base app path, what to do now?
+exit 1
+ fi
+
+ if [ ! -d "$BASE_APPLICATION_PATH" ]; then
+ echo "$(date_stringer): Creating the apps directory: $BASE_APPLICATION_PATH" >> "$SSM_LOG_FILE"
+ mkdir "$BASE_APPLICATION_PATH"
+ exit_on_error "Making apps directory when not already present"
+ fi
+}
+
+#hmmm: extract to core somewhere...
+# locates a parent directory of a certain name, if possible. returns success
+# (as zero) if the directory was found, and failure if there was no parent
+# named as requested. sets a global variable PARENT_DIR_FOUND to the full
+# directory name that matched, including the name being sought (but omitting
+# any deeper directories than that).
+function find_named_parent_dir()
+{
+ local dir_name_sought="$1"; shift
+ # clear any previous global result.
+ unset PARENT_DIR_FOUND
+ # check for degenerate case of parameter count.
+ if [ -z "$dir_name_sought" ]; then
+ echo "
+find_named_parent_dir: requires a directory name parameter, which will be
+sought out above the current directory. the return value indicates whether
+the requested name was found or not.
+"
+ return 1