--- /dev/null
+theme: jekyll-theme-merlot
\ No newline at end of file
are
generated. 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). 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".
The include directory is created as a copy of the headers in the
project's
directory . Library projects will also have their final products
##############
# system-wide install:
-export FEISTY_MEOW_APEX="/usr/local/fred/feisty_meow"
+export FEISTY_MEOW_APEX="/opt/feistymeow.org/feisty_meow"
# personal install:
#export FEISTY_MEOW_APEX="$HOME/feisty_meow"
##############
# system-wide install:
-export FEISTY_MEOW_APEX="/usr/local/fred/feisty_meow"
+export FEISTY_MEOW_APEX="/opt/feistymeow.org/feisty_meow"
# personal install:
#export FEISTY_MEOW_APEX="$HOME/feisty_meow"
# 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:
#
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
#ifndef BOOT_STRAPPING
// pull in the version specified for this build.
-///hmmm: on hold! #include <__build_version.h>
+ #include <__build_version.h>
+//why was this include "on hold"?
#else
// plug in a fake version for our bootstrapping process.
#define __build_FILE_VERSION "108.420.1024.10008"
# specifies the version of the code that is being constructed here.
major=2
minor=140
-revision=91
+revision=92
build=420
# specifies the remainder of the version record info.
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
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
| 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:
# 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.
==============
# 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'."
# this is the easy quick start script for normal folks.
cat $FEISTY_MEOW_APEX/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
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.
# 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\
# 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.
# 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
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
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
# 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
test_or_die "generating revision control file list"
popd &>/dev/null
-perform_revctrl_action_on_file "$tempfile" do_careful_git_update
+perform_revctrl_action_on_file "$tempfile" do_careful_git_update "$(\pwd)"
test_or_die "doing a careful git update on: $tempfile"
# send our little boat down the stream to the dependent repository.
--- /dev/null
+#!/bin/bash
+
+# this "fluffs out" the repositories that it finds. what this means is that
+# any git repositories found will have all of their remote state updated (by
+# pulling all remote repos). this ensures that any upstream changes get
+# merged into the local branch.
+# it's better to fluff out your code regularly rather than waiting for a huge
+# merge snarl later. note that if you check in the code frequently with the
+# feisty meow scripts, that will also take care of fluffing out the code.
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+source "$FEISTY_MEOW_SCRIPTS/rev_control/version_control.sh"
+
+##############
+
+dir="$1"; shift
+if [ -z "$dir" ]; then
+ dir=.
+fi
+
+pushd "$dir" &>/dev/null
+test_or_die "changing to directory: $dir"
+tempfile=$(generate_rev_ctrl_filelist)
+test_or_die "generating revision control file list"
+popd &>/dev/null
+
+perform_revctrl_action_on_file "$tempfile" do_careful_git_update
+test_or_die "fluffing out repository at: $tempfile"
+
fi
# a new set of steps we have to take to make sure the branch integrity is good.
- do_careful_git_update
+ do_careful_git_update "$(\pwd)"
# we continue on to the push, even if there were no changes this time, because
# there could already be committed changes that haven't been pushed yet.
##echo "$(git branch -vv | grep \* | cut -d ' ' -f2)"
##}
-# this exits with 0 for success (normal bash behavior) when up to date. if the branch is not up to date,
-# then these values are returned:
-#DOCUMENT THE VALUES
+# reports the status of the branch by echoing one of these values:
+# okay: up to date and everything is good.
+# needs_pull: this branch needs to be pulled from origins.
+# needs_push: there are unsaved changes on this branch to push to remote store.
+# diverged: the branches diverged and are going to need a merge.
# reference: https://stackoverflow.com/questions/3258243/check-if-pull-needed-in-git
function check_branch_state()
{
local to_return=120 # unknown issue.
-sep
-
- LOCAL=$(git rev-parse @)
- REMOTE=$(git rev-parse "$branch")
- BASE=$(git merge-base @ "$branch")
-var branch LOCAL REMOTE BASE
-
- if [ "$LOCAL" == "$REMOTE" ]; then
- echo "Up-to-date"
- to_return=0
- elif [ "$LOCAL" == "$BASE" ]; then
- echo "Need to pull"
- to_return=1
- elif [ "$REMOTE" == "$BASE" ]; then
- echo "Need to push"
- to_return=2
+ local local_branch=$(git rev-parse @)
+ local remote_branch=$(git rev-parse "$branch")
+ local merge_base=$(git merge-base @ "$branch")
+
+ if [ "$local_branch" == "$remote_branch" ]; then
+ echo "okay"
+ elif [ "$local_branch" == "$merge_base" ]; then
+ echo "needs_pull"
+ elif [ "$remote_branch" == "$merge_base" ]; then
+ echo "needs_push"
else
- echo "Diverged"
- to_return=3
+ echo "diverged"
fi
-sep
-
return $to_return
}
# other methods.
function do_careful_git_update()
{
- local this_branch="$(my_branch_name)"
+ local directory="$1"; shift
+ pushd "$directory" &>/dev/null
+ test_or_die "changing to directory: $directory"
+
+ if [ ! -d ".git" ]; then
+ # we ignore if they're jumping into a non-useful folder, but also tell them.
+ echo "Directory is not a git repository: $directory"
+ return 0
+ fi
# first update all our remote branches to their current state from the repos.
git remote update
test_or_die "git remote update"
+ local this_branch="$(my_branch_name)"
#appears to be useless; reports no changes when we need to know about remote changes that do exist:
-# check_branch_state "$this_branch"
-# state=$?
-# test_or_continue "branch state check"
-# echo the branch state is $state
+#hmmm: trying it out again now that things are better elsewhere. let's see what it says.
+ state=$(check_branch_state "$this_branch")
+ echo "=> branch '$this_branch' state is: $state"
# this code is now doing what i have to do when i repair the repo. and it seems to be good so far.
local branch_list=$(all_branch_names)
for bran in $branch_list; do
# echo "synchronizing remote branch: $bran"
git checkout "$bran"
- test_or_die "git checking out remote branch: $bran"
- git pull --no-ff origin "$bran"
+ test_or_die "git switching checkout to remote branch: $bran"
+
+ state=$(check_branch_state "$bran")
+ echo "=> branch '$bran' state is: $state"
+
+ remote_branch_info=$(git ls-remote --heads origin $bran 2>/dev/null)
+ if [ ! -z "$remote_branch_info" ]; then
+ # we are pretty sure the remote branch does exist.
+ git pull --no-ff origin "$bran"
+ fi
test_or_die "git pull of remote branch: $bran"
done
# now switch back to our branch.
# with any changes from others.
git pull --no-ff --all
test_or_die "git pulling all upstream"
+
+ popd &>/dev/null
}
# gets the latest versions of the assets from the upstream repository.
did_anything=yes
pushd "$dirname" &>/dev/null
echo "[$(pwd)]"
- $action .
+ # pass the current directory plus the remaining parameters from function invocation.
+ $action . $*
test_or_die "performing action $action on: $(pwd)"
sep 28
popd &>/dev/null