Merge branch 'release-2.140.93' 2.140.93
authorChris Koeritz <fred@gruntose.com>
Sat, 11 Nov 2017 04:01:47 +0000 (23:01 -0500)
committerChris Koeritz <fred@gruntose.com>
Sat, 11 Nov 2017 04:01:47 +0000 (23:01 -0500)
tasty merging

21 files changed:
documentation/clam_manual/clam_docs.html
documentation/history_anat.txt
feisty_inits/dot.bashrc-normal-user [deleted file]
feisty_inits/dot.bashrc-root [deleted file]
infobase/configuration/cron/aa_cron_defaults.crontab
infobase/configuration/quake3/quake3_server_start.txt
infobase/feisty_inits/dot.bashrc-normal-user [new file with mode: 0644]
infobase/feisty_inits/dot.bashrc-root [new file with mode: 0644]
production/setup_src/whole_build_package/whole_build_manifest.txt
readme.txt
scripts/archival/snarf_feisty_meow.pl
scripts/core/connect_feisty_meow.sh
scripts/core/generate_aliases.pl
scripts/core/launch_feisty_meow.sh
scripts/core/reconfigure_feisty_meow.sh
scripts/core/variables.sh
scripts/customize/fred/refred.sh
scripts/files/edit_files_matching.sh
scripts/generator/build_variables.sh
scripts/generator/show_version.sh [new file with mode: 0644]
scripts/system/add_apache_site.sh

index 6872a4e19a6173f5a3ae9aae20e4b07d96d98c21..b5380512b2d6534175a1577379d418d709fe2b96 100644 (file)
         are
         generated.&nbsp; All files generated by compilation are stored in the
         repository
-        directory (by default, either "~/feisty_meow" in Linux or "l:\" in
+        directory (by default, either "/opt/feistymeow.org/feisty_meow" in Linux or "l:\" in
         win32).&nbsp; There are three TYPEs supported so far: </big></p>
     <ul>
       <small> </small><big> </big><small> </small>
       be given
       an include directory named after the project, such as
 
-      "~/feisty_meow/include/basis".
+      "/opt/feistymeow.org/feisty_meow/include/basis".
       &nbsp;The include directory is created as a copy of the headers in the
       project's
       directory .&nbsp; Library projects will also have their final products
index 6f727015c9a6578787987552a1e89be8bc891d5e..46f95fc2899d6273267a54503afd459e5596d3c1 100644 (file)
@@ -74,18 +74,22 @@ octopi/
     Octopus design pattern and CROMP protocol reference implementations.  Assorted applications
     based on these.
 
-infabase/
+infobase/
     Some files considered critical to the operations of Feisty Meow Concerns Ltd.  This includes
     the database of fortunes used by the Nechung Oracle Program.
 
-documentation/
-    Helpful guides and information for Feisty Meow.  Also includes a code documentation generator
-    configuration for feisty meow that produces a nice set of web docs, using doxygen.
+infobase/feisty_inits
+    Some example startup files for use with feisty meow.  These are deployed automatically by
+    the "connect_feisty_meow" command.
 
-examples/
+infobase/examples/
     Some files that show how to get work done with Feisty Meow or that show how to do certain
     tasks in different scripting / programming languages.
 
+documentation/
+    Helpful guides and information for Feisty Meow.  Also includes a code documentation generator
+    configuration for feisty meow that produces a nice set of web docs, using doxygen.
+
 kona/
     Our burgeoning Java libraries.  Not much to see here yet, but there is some code piling
     up for these that we will try to release soon.
diff --git a/feisty_inits/dot.bashrc-normal-user b/feisty_inits/dot.bashrc-normal-user
deleted file mode 100644 (file)
index 526b171..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-##############
-
-# initializes the feisty meow environment for "normal" users (not intended for the root user).
-
-##############
-
-# drag in the default version of this file.  this may not be needed if your
-# .bashrc script already has substantial code or already does this.
-source /etc/bash.bashrc
-
-##############
-
-# set the history sizes to be much larger, and do this whether we load the
-# feisty meow environment or not.
-
-export HISTSIZE=1000000
-export HISTFILESIZE=8000000
-
-##############
-
-# system-wide install:
-export FEISTY_MEOW_APEX="/usr/local/fred/feisty_meow"
-# personal install:
-#export FEISTY_MEOW_APEX="$HOME/feisty_meow"
-
-# sets up the feisty_meow scripts if appropriate for the environment.
-if [ "${TERM}" != "dumb" -a -z "$PBS_ENVIRONMENT" ]; then
-  source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
-fi
-
-# if not commented out, then feisty meow will run all the unit tests during builds.
-#export RUN_ALL_TESTS=true
-
-# turns on noisy debugging in feisty meow scripts if uncommented.
-#export DEBUG_FEISTY_MEOW=true
-
-##############
-
diff --git a/feisty_inits/dot.bashrc-root b/feisty_inits/dot.bashrc-root
deleted file mode 100644 (file)
index ee86094..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-
-##############
-
-# provides a macro to initialize the feisty meow environment for the "root" user.
-
-##############
-
-# drag in the default version of this file.  this may not be needed if your
-# .bashrc script already has substantial code or already does this.
-source /etc/bash.bashrc
-
-##############
-
-# set the history sizes to be much larger, and do this whether we load the
-# feisty meow environment or not.
-
-export HISTSIZE=1000000
-export HISTFILESIZE=8000000
-
-##############
-
-# system-wide install:
-export FEISTY_MEOW_APEX="/usr/local/fred/feisty_meow"
-# personal install:
-#export FEISTY_MEOW_APEX="$HOME/feisty_meow"
-
-# the "fredme" macro enables the feisty_meow environment.
-alias fredme='source "$FEISTY_MEOW_APEX/feisty_meow/scripts/core/launch_feisty_meow.sh"'
-
-# if not commented out, then feisty meow will run all the unit tests during builds.
-#export RUN_ALL_TESTS=true
-
-# turns on noisy debugging in feisty meow scripts if uncommented.
-#export DEBUG_FEISTY_MEOW=true
-
-##############
-
index 375d1d388bab757c548423abfb7a2c7303993cd9..51a73ff46d2a617a2437ec106d33ab7450f11fc9 100644 (file)
 # HOME, which is pretty lucky for us...
 # please change the name to the user running the cronjob, or to whatever
 # unique string you'd like to use:
-CRONUSER=FILL_CRONUSER_HERE
+CRONUSER=FILL-CRONUSER-HERE
 
 # set the shell to bash.  (not the default for some cron implementations.)
 SHELL=/bin/bash
 
-# set the top-level folder for feisty meow here, since cron gets almost
-# nothing from the user's environment.  this folder needs to be updated for
-# your own particular install location.
+# set the top-level folder for feisty meow here; important because cron gets
+# almost nothing from the user's environment.  this folder needs to be updated
+# for your own particular install location.
+FEISTY_MEOW_APEX=/opt/feistymeow.org/feisty_meow
 #FEISTY_MEOW_APEX=$HOME/feisty_meow
-FEISTY_MEOW_APEX=/usr/local/fred/feisty_meow
 
 # crontab miniature docs:
 #
index ef4e9bb5e5b6b8bf5c43c501813cb6a6e25bcfed..a498a3a459249df8f73299debdd7bd68ec54638d 100644 (file)
@@ -10,6 +10,6 @@ that i don't know but which i have heard of.
 
 this just automates the copying of the config file before running quake.
 
-cp ~/feisty_meow/infobase/quake3/fred_free_for_all.cfg /usr/local/games/quake3/baseq3/ ; nohup quake3 +set dedicated 1 +exec fred_free_for_all.cfg 
+cp $FEISTY_MEOW_APEX/infobase/quake3/fred_free_for_all.cfg /usr/local/games/quake3/baseq3/ ; nohup quake3 +set dedicated 1 +exec fred_free_for_all.cfg 
 
 
diff --git a/infobase/feisty_inits/dot.bashrc-normal-user b/infobase/feisty_inits/dot.bashrc-normal-user
new file mode 100644 (file)
index 0000000..edc83b7
--- /dev/null
@@ -0,0 +1,39 @@
+
+##############
+
+# initializes the feisty meow environment for "normal" users (not intended for the root user).
+
+##############
+
+# drag in the default version of this file.  this may not be needed if your
+# .bashrc script already has substantial code or already does this.
+source /etc/bash.bashrc
+
+##############
+
+# set the history sizes to be much larger, and do this whether we load the
+# feisty meow environment or not.
+
+export HISTSIZE=1000000
+export HISTFILESIZE=8000000
+
+##############
+
+# system-wide install:
+export FEISTY_MEOW_APEX="/opt/feistymeow.org/feisty_meow"
+# personal install:
+#export FEISTY_MEOW_APEX="$HOME/feisty_meow"
+
+# sets up the feisty_meow scripts if appropriate for the environment.
+if [ "${TERM}" != "dumb" -a -z "$PBS_ENVIRONMENT" ]; then
+  source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
+fi
+
+# if not commented out, then feisty meow will run all the unit tests during builds.
+#export RUN_ALL_TESTS=true
+
+# turns on noisy debugging in feisty meow scripts if uncommented.
+#export DEBUG_FEISTY_MEOW=true
+
+##############
+
diff --git a/infobase/feisty_inits/dot.bashrc-root b/infobase/feisty_inits/dot.bashrc-root
new file mode 100644 (file)
index 0000000..20a9023
--- /dev/null
@@ -0,0 +1,37 @@
+
+##############
+
+# provides a macro to initialize the feisty meow environment for the "root" user.
+
+##############
+
+# drag in the default version of this file.  this may not be needed if your
+# .bashrc script already has substantial code or already does this.
+source /etc/bash.bashrc
+
+##############
+
+# set the history sizes to be much larger, and do this whether we load the
+# feisty meow environment or not.
+
+export HISTSIZE=1000000
+export HISTFILESIZE=8000000
+
+##############
+
+# system-wide install:
+export FEISTY_MEOW_APEX="/opt/feistymeow.org/feisty_meow"
+# personal install:
+#export FEISTY_MEOW_APEX="$HOME/feisty_meow"
+
+# the "fredme" macro enables the feisty_meow environment.
+alias fredme='source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"'
+
+# if not commented out, then feisty meow will run all the unit tests during builds.
+#export RUN_ALL_TESTS=true
+
+# turns on noisy debugging in feisty meow scripts if uncommented.
+#export DEBUG_FEISTY_MEOW=true
+
+##############
+
index e12d8425c1da8bd05b3bf3d3bae9a7d1fb771afa..017b534b12a73a909890709d04bd4fceb74b17aa 100644 (file)
@@ -8,9 +8,7 @@ production_inis=t
 docs=t
 top_makefile=t
 production_makefile=t
-##customize=t
-database=t
-examples=t
+infobase=t
 scripts=t
 nucleus=t
 octopi=t
@@ -70,7 +68,7 @@ keyword=sources
 #recurse=1
 #keyword=sources
 
-[database]
+[infobase]
 source=$FEISTY_MEOW_APEX/infobase
 target=$TARGET/infobase
 recurse=1
@@ -82,12 +80,6 @@ target=$TARGET/documentation
 recurse=1
 keyword=sources
 
-[examples]
-source=$FEISTY_MEOW_APEX/examples
-target=$TARGET/examples
-recurse=1
-keyword=sources
-
 [scripts]
 source=$FEISTY_MEOW_APEX/scripts
 target=$TARGET/scripts
index c089a4e771d71a261e8d19bb65f730bb0f0e5d3b..0fda046ea9e12470e4bf01335b68dc7ea8888cd7 100644 (file)
@@ -6,20 +6,21 @@ Quick Start Guide for the Feisty Meow Codebase
 Commands that can be typed in a console or terminal are are prefixed with "#".
 Information that varies by platform is prefixed with a '|' character.
 
+This documentation assumes that the code is stored in the default location:
+  /opt/feistymeow.org/feistymeow
+If you have stored it elsewhere, then please adapt the commands accordingly.
+
 ==============
 
 How to get the feisty meow codebase
 
 | On Microsoft Windows, install the Cygwin tools as documented here:
-| ~/feisty_meow/documentation/cygwin_install_list.txt (local file) or
+| /opt/feistymeow.org/feisty_meow/documentation/cygwin_install_list.txt (local file) or
 | https://feistymeow.org/feisty_meow/documentation/cygwin_install_list.txt (web)
 
 Retrieve a clone of the feisty meow codebase:
 # git clone git://feistymeow.org/feisty_meow
 
-The remainder of these notes assume that the code is stored in:
-  ~/feisty_meow (aka $HOME/feisty_meow).
-
 ==============
 
 How to load the feisty meow script environment
@@ -27,17 +28,17 @@ How to load the feisty meow script environment
 Set up the feisty_meow scripts; this is only needed once, when you first get
 the codebase.  It will also regenerate the scripts using the latest installed
 version.
-# bash ~/feisty_meow/scripts/core/reconfigure_feisty_meow.sh
+# bash /opt/feistymeow.org/feisty_meow/scripts/core/reconfigure_feisty_meow.sh
 
 Connect the feisty meow scripts to your login script (in ~/.bashrc).
 Note that this actually modifies ~/.bashrc.  This step is only needed once.
-# bash ~/feisty_meow/scripts/core/connect_feisty_meow.sh
+# bash /opt/feistymeow.org/feisty_meow/scripts/core/connect_feisty_meow.sh
 
 Load the script environment into the current shell.  This can be done for
 any new shell.  This is idempotent, so it does no harm to run it again.
 Note that you should not need this step if you connected feisty meow to
 ~/.bashrc above.
-# source ~/feisty_meow/scripts/core/launch_feisty_meow.sh
+# source /opt/feistymeow.org/feisty_meow/scripts/core/launch_feisty_meow.sh
 
 When the feisty meow script environment loaded, many new aliases and
 functions are available for use.  These come from the $FEISTY_MEOW_SCRIPTS
@@ -72,10 +73,6 @@ in the "nucleus", "octopi", "graphiq" and other C++ collections.
 | Centos / Redhat / Fedora:
 | # sudo yum install gcc gcc-c++ openssl-devel.x86_64 curl-devel
 
-| Microsoft Windows:
-| Download and install the Cygwin environment first from cygwin.com, which is
-| documented in ~/feisty_meow/documentation/cygwin_install_list.txt
-
 The "kona" collection depends on Java version 8 or better.
 
 | Ubuntu:
@@ -90,8 +87,7 @@ Run the following command to build the feisty meow libraries and applications.
 # produce_feisty_meow
 
 After the build is complete, the feisty meow applications can be found in
-$FEISTY_MEOW_BINARIES (environment variable).
-# ls $FEISTY_MEOW_BINARIES 
+the folder pointed at by the $FEISTY_MEOW_BINARIES environment variable.
 
 ==============
 
index d79a73f5f9187e768b243e6be6f2bac0b98f555c..c695be7371d98820e388d3cb67bc24da5fb6fa3b 100644 (file)
@@ -42,9 +42,7 @@ local($root) = &canonicalize("$FEISTY_MEOW_APEX");
 ###moved &backup_hierarchy($snarf_file_base, $number, $root, "customize");
 &backup_hierarchy($snarf_file_base, $number, $root, "infobase");
 &backup_hierarchy($snarf_file_base, $number, $root, "documentation");
-&backup_hierarchy($snarf_file_base, $number, $root, "examples");
 &backup_hierarchy($snarf_file_base, $number, $root, "experiments");
-&backup_hierarchy($snarf_file_base, $number, $root, "feisty_inits");
 &backup_hierarchy($snarf_file_base, $number, $root, "graphiq");
 &backup_hierarchy($snarf_file_base, $number, $root, "huffware");
 &backup_hierarchy($snarf_file_base, $number, $root, "kona");
index 6b23579372dcdaebdbbbd99e72bd3f5b0422a818..9a5c81d548bb3b98b6b22e36a3009641f6cdb868 100644 (file)
@@ -9,15 +9,17 @@ export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's work
 # normalize the path we want to cobble together.
 export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )"
 
+echo calculated apex as $FEISTY_MEOW_APEX
+
 if [ -f "$HOME/.bashrc" ] && grep -q "launch_feisty_meow.sh" "$HOME/.bashrc"; then
   # the stanza for loading feisty meow already seems to be present.
   echo "Feisty Meow already seems to be configured in '~/.bashrc'."
 else
   # stuff the normal user init file into .bashrc.  not appropriate for root probably, but
   # this is the easy quick start script for normal folks.
-  cat $FEISTY_MEOW_APEX/feisty_inits/dot.bashrc-normal-user |
+  cat $FEISTY_MEOW_APEX/infobase/feisty_inits/dot.bashrc-normal-user |
     sed -e \
-      "s? \$.*/scripts/core/launch_feisty? $FEISTY_MEOW_APEX/scripts/core/launch_feisty?" \
+      "s?FEISTY_MEOW_APEX=\".*\"?FEISTY_MEOW_APEX=\"$FEISTY_MEOW_APEX\"?" \
       >> "$HOME/.bashrc"
   echo "Feisty Meow is now configured in '~/.bashrc'."
 fi
index 45ff8118cd474afdaae827155fe7a56fb58db49e..4ed01fb74641794fe21613eeb98ee0d4e35d1513 100644 (file)
@@ -94,11 +94,13 @@ sub rebuild_script_aliases {
   }
   if (length($DEBUG_FEISTY_MEOW)) {
     print "using these alias files:\n";
+print "HEY IS THIS PROBLEM CHILD?\n";
     foreach $i (@ALIAS_DEFINITION_FILES) {
       local $base_of_dir = &basename(&dirname($i));
       local $basename = &basename($i);
       print "  $base_of_dir/$basename\n";
     }
+print "WAS PROBLEM CHILD ABOVE HERE?\n";
   }
 
   # write the aliases for sh and bash scripts.
@@ -147,7 +149,7 @@ if ( ! length("$FEISTY_MEOW_LOADING_DOCK") ) {
 The FEISTY_MEOW_LOADING_DOCK variable is not defined.  This must point to\
 the location where the generated scripts are stored.  You may still need to\
 configure the feisty meow script system with something like:\
-  bash ~/feisty_meow/scripts/core/reconfigure_feisty_meow.sh\
+  bash /opt/feistymeow.org/feisty_meow/scripts/core/reconfigure_feisty_meow.sh\
 Please see http://feistymeow.org for more details.\n";
   exit 1;
 #really need to use better exit codes.
index 8b07cc3b04997a0f70309488d4e54b7f68eabfc4..80226899a83bad279656c1986bfc825ebc186775 100644 (file)
 
 ##############
 
+# this script cannot handle figuring out where it lives, so approaches that
+# get the WORKDIR will fail.  this is a consequence of this always being used
+# in bash's 'source' directive, which does not pass the script name as
+# argument 0.  instead, we just check for the bad condition of a malconfigured
+# script system and try to repair it.
+
+# check if any crucial folder is hosed.  we will torch the existing config
+# to the extent we can.
+if [ ! -d "$FEISTY_MEOW_SCRIPTS" -o ! -d "$FEISTY_MEOW_APEX" ]; then
+  # wipe out the offending variable(s).
+  unset FEISTY_MEOW_SCRIPTS FEISTY_MEOW_APEX
+  # clean out any unfortunate wrongness that may exist in our generated areas.
+  if [ -d "$"FEISTY_MEOW_LOADING_DOCK ]; then \rm -rf "$FEISTY_MEOW_LOADING_DOCK"; fi
+  if [ -d "$FEISTY_MEOW_GENERATED_STORE" ]; then \rm -rf "$FEISTY_MEOW_GENERATED_STORE"; fi
+  # also wipe any values from the variables pointing at generated stuff.
+  unset FEISTY_MEOW_LOADING_DOCK FEISTY_MEOW_GENERATED_STORE
+  exec "$*"
+fi
+
+##############
+
 # some preconditions we want to establish before loading anything...
 
 # make sure that aliases can be used in non-interactive shells.
@@ -44,11 +65,10 @@ if [ -z "$FEISTY_MEOW_LOADING_DOCK" ]; then
   # make sure our main variables are established.
   FEISTY_MEOW_VARIABLES_LOADING_FILE="$FEISTY_MEOW_LOADING_DOCK/fmc_variables.sh"
   if [ ! -f "$FEISTY_MEOW_VARIABLES_LOADING_FILE" ]; then
-    echo -e '\n\n'
-    example_dir="/usr/local/fred"
     echo -e "\
+
 The feisty meow scripts need initialization via the bootstrap process.  For\n\
-example, if the feisty meow folder lives in '$example_dir', then this\n\
+example, if the feisty meow folder lives in '$DEFAULT_FEISTYMEOW_ORG_DIR', then this\n\
 command bootstraps feisty meow:\n\
 \n\
   bash $example_dir/feisty_meow/scripts/core/reconfigure_feisty_meow.sh\n\
index dad26d1477cbdd79d404d90ca38673bd1de55e68..b6421224607bcd18d5fd39ca55e630eff0046113 100644 (file)
@@ -7,7 +7,7 @@
 #
 # Note: this does not yet ensure that the profile is executed on shell
 # startup.  that can be added manually by editing your .bashrc file.
-# read the examples/feisty_meow_startup/bashrc_user file for more details.
+# read the files infobase/feisty_inits for more details.
 
 ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && /bin/pwd )"
 CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )"
@@ -21,6 +21,9 @@ source "$CORE_SCRIPTS_DIR/functions.sh"
 export FEISTY_MEOW_APEX="$(/bin/pwd)"
 #echo feisty now is FEISTY_MEOW_APEX=$FEISTY_MEOW_APEX
 
+# make the variables script run again.
+unset CORE_VARIABLES_LOADED
+
 # repetitive bit stolen from variables.  should make a file out of this somehow.
 IS_DOS=$(uname | grep -i ming)
 if [ -z "$IS_DOS" ]; then IS_DOS=$(uname | grep -i cygwin); fi
@@ -42,7 +45,12 @@ if [ ! -d "$FEISTY_MEOW_LOADING_DOCK" ]; then
   mkdir -p "$FEISTY_MEOW_LOADING_DOCK"
 fi
 # need to add some paths explicitly until we've bootstrapped ourselves.
-export PERLLIB=$PERLLIB:"$FEISTY_MEOW_SCRIPTS/files":"$FEISTY_MEOW_SCRIPTS/generator"
+#hmmm: this is tasty reusable code...
+export PERLLIB=$(echo $PERLLIB | sed -e "s?\([:]*\)\([^:]*feisty_meow[^:]*\)\([:]*\)??g")
+
+PERLLIB=$PERLLIB:"$FEISTY_MEOW_SCRIPTS/core":"$FEISTY_MEOW_SCRIPTS/files":"$FEISTY_MEOW_SCRIPTS/generator"
+PERL5LIB=$PERLLIB
+#echo PERLLIB after modification is $PERLLIB
 # make toast out of generated files right away, but leave any custom scripts.
 find "$FEISTY_MEOW_LOADING_DOCK" -maxdepth 1 -type f -exec perl "$FEISTY_MEOW_SCRIPTS/files/safedel.pl" "{}" ';'
 # &>/dev/null
@@ -61,11 +69,13 @@ done
 # load our variables so we can run our perl scripts successfully.
 source "$FEISTY_MEOW_SCRIPTS/core/variables.sh"
 
-# create our common aliases.
-perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl"
+# create our common aliases.  we need to refresh the PERLLIB since the shell
+# seems to keep accumulating the value in a weird way.
+PERLLIB=$PERLLIB PERL5LIB=$PERLLIB perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl"
+#echo after the generate aliases, perllib is $PERLLIB
 
 if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then
-  echo established these variables for feisty_meow assets:
+  echo this is the variable config file for feisty_meow assets:
   echo ==============
   cat "$FEISTY_MEOW_VARIABLES_LOADING_FILE"
   echo ==============
index 976c7898cbfd20ee14ffda97e0ee4443e9da05e9..b6311dacff8517b02357178abcc4ff9a3f09ab6f 100644 (file)
@@ -56,6 +56,9 @@ if [ -z "$CORE_VARIABLES_LOADED" ]; then
   
   # start with some simpler things.
   
+#hmmm: this needs to come from some configuration item.  especially for installs.
+define_yeti_variable DEFAULT_FEISTYMEOW_ORG_DIR=/opt/feistymeow.org
+
   define_yeti_variable SCRIPT_SYSTEM=feisty_meow
   
   # OS variable records the operating system we think we found.
@@ -93,9 +96,12 @@ if [ -z "$CORE_VARIABLES_LOADED" ]; then
   # this is only used for extreme failure modes, when the values were not
   # pulled in from our auto-generated config.
   if [ -z "$FEISTY_MEOW_APEX" ]; then
-    if [ -d "$HOME/feisty_meow" ]; then
+    if [ -d "/opt/feistymeow.org/feisty_meow" ]; then
+      define_yeti_variable FEISTY_MEOW_APEX="/opt/feistymeow.org/feisty_meow"
+      define_yeti_variable FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_APEX/scripts"
+    elif [ -d "$HOME/feisty_meow" ]; then
       define_yeti_variable FEISTY_MEOW_APEX="$HOME/feisty_meow"
-      define_yeti_variable FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_SCRIPTS"
+      define_yeti_variable FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_APEX/scripts"
     fi
   fi
 
@@ -169,7 +175,6 @@ if [ -z "$CORE_VARIABLES_LOADED" ]; then
   # variables for perl.
   
   define_yeti_variable PERLLIB+="/usr/lib/perl5"
-  define_yeti_variable PERL5LIB+="/usr/lib/perl5"
   if [ "$OS" == "Windows_NT" ]; then
     define_yeti_variable PERLIO=:perlio
       # choose perl's IO over the ms-windows version so we can handle file
@@ -184,10 +189,10 @@ if [ -z "$CORE_VARIABLES_LOADED" ]; then
       ls $i/*.pl &>/dev/null
       if [ $? -eq 0 ]; then
         PERLLIB+=":$(dos_to_unix_path $i)"
-        PERL5LIB+=":$(dos_to_unix_path $i)"
       fi
     fi
   done
+  define_yeti_variable PERL5LIB=$PERLLIB
   #echo PERLLIB is now $PERLLIB
   
   ##############
index 908e3bd5494be376a71abf16bc32e2007f146c4d..2f00854a2c675b44ff9738dd50460cae6de3571b 100644 (file)
@@ -15,8 +15,14 @@ function refred()
   done
 #echo arch addin now is: $arch_addin
 
+  # special case that makes our software hierarchy folder, if it doesn't exist.
+  # everything else is only re-permed if it exists.
+  if [ ! -d "$DEFAULT_FEISTYMEOW_ORG_DIR" ]; then
+    sudo mkdir "$DEFAULT_FEISTYMEOW_ORG_DIR"
+  fi
+
   # iterate across the list of dirs we want fred to own and change their ownership.
-  for dirname in /home/fred /usr/local/fred /home/games $arch_addin; do
+  for dirname in /home/fred $DEFAULT_FEISTYMEOW_ORG_DIR /usr/local/fred /home/games $arch_addin; do
     if [ -d "$dirname" ]; then
       echo "refred on '$dirname'"
       sudo chown -R fred:fred $dirname
index 98c57ed59a2d2482ce6a2ae6a96fa2c80c32f98a..31662a3f10ce3bad1c9368c9e0290dbe25861528 100644 (file)
@@ -10,8 +10,8 @@ function print_instructions()
 
   echo "for example:"
 
-  echo "  $(basename $0 .sh) ~/feisty_meow hoople.net hoople.org"
-  echo "the above will search the directory ~/feisty_meow for all matches to"
+  echo "  $(basename $0 .sh) $FEISTY_MEOW_APEX hoople.net hoople.org"
+  echo "the above will search the directory $FEISTY_MEOW_APEX for all matches to"
   echo "the two patterns 'hoople.org' and 'hoople.net'."
 
   exit 1
index 3139aac7bc79e113c4184555727dfde002d1f6af..c8a4c3ec637ba19c1fecbbb8e0aa2c1d5b89f1e1 100644 (file)
@@ -9,12 +9,12 @@
 #  building the source code.  It can either be run as a bash script directly
 #  like so:
 #
-#      bash ~/feisty_meow/scripts/generator/build_variables.sh
+#      bash $FEISTY_MEOW_APEX/scripts/generator/build_variables.sh
 #
 #  which will establish a new shell containing all the variables, or you can
 #  'source' the script like so:
 #
-#      build_vars=~/feisty_meow/scripts/generator/build_variables.sh
+#      build_vars=$FEISTY_MEOW_APEX/scripts/generator/build_variables.sh
 #      source $build_vars $build_vars
 #
 #  to set all of the variables in your current shell.  The full path is
diff --git a/scripts/generator/show_version.sh b/scripts/generator/show_version.sh
new file mode 100644 (file)
index 0000000..5091b64
--- /dev/null
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+# increments the build version number.
+
+#mkdir -p "$TEMPORARIES_PILE"
+
+#hmmm: looks like repeated reusable code below (compare with next_version)
+export PARAMETER_FILE
+if [ ! -z "$BUILD_PARAMETER_FILE" ]; then
+  # define our version of the build parameter file.  this should be set
+  # beforehand so we override the default parameter file for clam.
+  PARAMETER_FILE="$BUILD_PARAMETER_FILE"
+fi
+if [ -z "$PARAMETER_FILE" ]; then
+  # last ditch attempt to get one that will work.
+  PARAMETER_FILE="$FEISTY_MEOW_APEX/build.ini"
+fi
+
+#chmod u+w "$PARAMETER_FILE"
+
+#new_buildini="$(mktemp "$TEMPORARIES_PILE/buildini.XXXXXX")"
+## whack the file just in case.
+#rm -f "$new_buildini"
+#echo -n "" >"$new_buildini"
+
+# pick a weird separator that we hope never to see.
+IFS='~'
+
+found_version=""
+skip_line=""
+
+major_string=
+minor_string=
+revision_string=
+
+#hmmm: now i know i'm having deja vu.  this loop is a big chunk of reusable code that should be abstracted from this file and from next_version
+
+while read line_found; do
+  if [ $? != 0 ]; then break; fi
+#echo line found is $line_found
+  if [ ! -z "$skip_line" ]; then
+    # we were told to skip this line to fix win32.
+    skip_line=""
+    continue
+  fi
+
+  # these checks don't care about whether we've seen other stuff yet.
+  if [ -z "$major_string" ]; then
+    if [ ! -z "$(echo $line_found | sed -n -e 's/^ *major *=.*$/yep/p')" ]; then
+      major_string=$(echo $line_found | sed -e 's/.*=\(.*\)$/\1/' )
+    fi
+  fi
+  if [ -z "$minor_string" ]; then
+    if [ ! -z "$(echo $line_found | sed -n -e 's/^ *minor *=.*$/yep/p')" ]; then
+      minor_string=$(echo $line_found | sed -e 's/.*=\(.*\)$/\1/' )
+    fi
+  fi
+
+  # we process the revision string line specially.
+  if [ -z "$found_version" ]; then
+       if [ "$line_found" == "#[version]" ]; then
+         # repair our special escape that makes this a valid ini file and
+         # gnu make include file.
+#        echo -e "#\\\\\n[version]" >>"$new_buildini"
+         found_version="yes"
+      continue
+       elif [ "$line_found" == "#" ]; then
+         # retarded win32 case.
+#        echo -e "#\\\\\n[version]" >>"$new_buildini"
+         found_version="yes"
+         skip_line="yes"
+      continue
+       fi
+  elif [ -z "$revision_string" ]; then
+    if [ ! -z "$(echo $line_found | sed -n -e 's/^ *revision *=.*$/yep/p')" ]; then
+      revision_string=$(echo $line_found | sed -e 's/.*=\(.*\)$/\1/' )
+#echo second part is $revision_string 
+      revision_string=$(expr $revision_string + 1)
+#      echo "revision=$revision_string" >>"$new_buildini"
+      # don't print the line normally also.
+      continue
+    fi
+  fi
+
+  # send the line with no special processing.
+#  echo "$line_found" >>"$new_buildini"
+
+done <"$PARAMETER_FILE"
+
+## if we created something with contents, let's use it.
+#if [ -s "$new_buildini" ]; then
+#  cp "$new_buildini" "$PARAMETER_FILE"
+#fi
+
+echo "Current build version is: $major_string.$minor_string.$revision_string"
+
+# don't leave the temporary version files floating around.
+#rm -f "$new_buildini"
+
index 6b0956347d17406dc8ddc28e19354e89f1d6cea1..e99f371a1dec349de0c82cb79635c132d2044c42 100644 (file)
@@ -16,6 +16,8 @@ function write_apache_config()
 {
   local appname="$1"; shift
   local sitename="$1"; shift
+  local site_path="$1"; shift
+
   local site_config="/etc/apache2/sites-available/${sitename}.conf"
 
   # check if config file already exists and bail if so.
@@ -30,12 +32,19 @@ function write_apache_config()
   echo "Creating a new apache2 site for $sitename with config file:"
   echo "  $site_config"
 
-  # path where site gets checked out, in some arcane manner, and which happens to be
-  # above the path where we put webroot (in the storage suffix, if defined).
-  local path_above="${BASE_PATH}/${appname}"
-  # no slash between appname and suffix, in case suffix is empty.
-  local full_path="${BASE_PATH}/${appname}${STORAGE_SUFFIX}"
+  # if no path, then we default to our standard app storage location.  otherwise, we
+  # put the site where they told us to.
+  if [ -z "$site_path" ]; then
+    # path where site gets checked out, in some arcane manner, and which happens to be
+    # above the path where we put webroot (in the storage suffix, if defined).
+    local path_above="${BASE_PATH}/${appname}"
+    # no slash between appname and suffix, in case suffix is empty.
+    local full_path="${path_above}${STORAGE_SUFFIX}"
 #echo really full path is $full_path
+  else
+    # we'll go with their specification for the site storage.
+    local full_path="$site_path"
+  fi
 
   echo "
 # set up the user's web folder as an apache user web directory.
@@ -125,16 +134,24 @@ fi
 
 appname="$1"; shift
 site="$1"; shift
+site_path="$1"; shift
 
 if [ -z "$appname" -o -z "$site" ]; then
-  echo "This script needs to know (1) the appname (application name) for the new"
-  echo "site and (2) the DNS name for the apache virtual host."
-  echo "The appname should work as a file-system compatible folder name."
+#hmmm: move to a print_instructions function.
+  echo "
+$(basename $0): {app name} {dns name} [site path]
+
+This script needs to know (1) the application name for the new site and
+(2) the DNS name for the apache virtual host.  The appname should be an
+appropriate name for a file-system compatible folder name.  There is an
+optional third parameter (3) the path for site storage.  If the site path
+is not provided, we'll use this path:
+  $BASE_PATH/{app name}/$STORAGE_SUFFIX"
   exit 1
 fi
 
 maybe_create_site_storage "$appname"
-write_apache_config "$appname" "$site"
+write_apache_config "$appname" "$site" "$site_path"
 enable_site "$site"
 restart_apache