--- /dev/null
+
+tickling a check-in
.DS_Store
*.log
*.gz
+.no-checkin
*.o
*.obj
*_version.rc
# specifies the version of the code that is being constructed here.
major=2
minor=140
-revision=122
+revision=123
build=420
# specifies the remainder of the version record info.
###############################################################################
ifeq "$(COMPILER)" "GNU_DARWIN"
+ # finds the crypto code on macos.
+ HEADER_SEARCH_PATH += /usr/local/opt/openssl/include
+ LIBRARY_SEARCH_PATH += /usr/local/opt/openssl/lib/
+
ifneq "$(USE_XWIN)" ""
DEFINITIONS += __XWINDOWS__ __X__
LIBS_USED +=
#need to separate out with a USE_MOTIF kind of thing.
#LIBS_USED += Xmu
HEADER_SEARCH_PATH += /usr/include/X11 /usr/X11R6/include /usr/include/g++
- LIBRARY_SEARCH_PATH += /usr/X11R6/lib
+ LIBRARY_SEARCH_PATH += /usr/X11R6/lib
endif
ifneq "$(USE_SSL)" ""
fi
# launch sudo with just the variables we want to reach the other side.
- # we take an extra step to null out the PATH, since MacOS seems to want
- # to pass that even for a login shell (-i) somehow.
- PATH= /usr/bin/sudo --preserve-env=SSH_AUTH_SOCK,IMPORTED_XAUTH "$@"
+ local varmods=
+# varmods+="PATH= "
+ if [ ! -z "$IMPORTED_XAUTH" ]; then varmods+="IMPORTED_XAUTH=$IMPORTED_XAUTH "; fi
+ if [ ! -z "$SSH_AUTH_SOCK" ]; then varmods+="SSH_AUTH_SOCK=$SSH_AUTH_SOCK"; fi
+ /usr/bin/sudo $varmods "$@"
retval=$?
# take the xauth info away again if it wasn't set already.
fi
local charnfile="$(mktemp $TMP/zz_charn.XXXXXX)"
+#hmmm: any way to do the below more nicely or reusably?
find "${dirs[@]}" -follow -maxdepth 1 -mindepth 1 -type f | \
grep -i \
-"doc\|docx\|eml\|html\|jpeg\|jpg\|m4a\|mov\|mp3\|ods\|odt\|pdf\|png\|ppt\|pptx\|txt\|vsd\|vsdx\|xls\|xlsx\|zip" | \
+"csv\|doc\|docx\|eml\|html\|jpeg\|jpg\|m4a\|mov\|mp3\|ods\|odt\|pdf\|png\|ppt\|pptx\|txt\|vsd\|vsdx\|xls\|xlsx\|zip" | \
sed -e 's/^/"/' | sed -e 's/$/"/' | \
xargs bash "$FEISTY_MEOW_SCRIPTS/files/spacem.sh"
# drop the temp file now that we're done.
##############
- # site avenger aliases
+ # tty relevant functions...
+
+ # keep_awake: sends a message to the screen from the background.
+ function keep_awake()
+ {
+ # just starts the keep_awake process in the background.
+ bash $FEISTY_MEOW_SCRIPTS/tty/keep_awake_process.sh &
+ # this should leave the job running as %1 or a higher number if there
+ # are pre-existing background jobs.
+ }
+
+ ##############
+
+ # site avenger functions...
+
function switchto()
{
THISDIR="$FEISTY_MEOW_SCRIPTS/site_avenger"
############################
-# set some fairly liberal limits for ant.
-#no. export ANT_OPTS="-Xms512m -Xmx768m -XX:MaxPermSize=768m"
-
-############################
-
# start guessing some settings...
+# whatever we figure out, we want to export the java home variable.
+export JAVA_HOME
+
# this bin portion works for most javas...
export JAVA_BIN_PIECE=bin
+# try using java itself to locate the JAVA_HOME if we can.
+if [ ! -d "$JAVA_HOME" ]; then
+ JAVA_HOME=$(java -XshowSettings:properties -version 2>&1 | grep -i java.home | sed -e 's/.*java.home = \(.*\)$/\1/')
+fi
+
+# if that didn't work, then we try a series of random bizarro places where
+# we have seen java live before.
+
+#hmmm: below list is way out of date. we really hope the first attempt above works.
+
if [ ! -d "$JAVA_HOME" ]; then
# try a recent version.
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
local to_return=120 # unknown issue.
- local local_branch=$(git rev-parse @)
+ local local_branch=$(git rev-parse HEAD)
local remote_branch=$(git rev-parse "$branch")
- local merge_base=$(git merge-base @ "$branch")
+ local merge_base=$(git merge-base HEAD "$branch")
local to_echo=
if [ "$local_branch" == "$remote_branch" ]; then
# now pull down any changes in our own origin in the repo, to stay in synch
# with any changes from others.
- git pull --tags --all | $TO_SPLITTER
+ git fetch --tags --all | $TO_SPLITTER
#is the above really important when we did this branch already in the loop?
#it does an --all, but is that effective or different? should we be doing that in above loop?
promote_pipe_return 0
--- /dev/null
+#!/bin/bash
+
+# updates the moodle install, assuming all paths are at the default.
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+
+####
+# some constants that we know are not really.
+moodle_parent=/var/www/html
+ # parent directory is one level up from where moodle lives.
+moodle_dir=moodle
+ # this variable is just the directory name for moodle itself, not a path.
+moodle_release=moodle-3.9
+ # the name of the release we're expecting to download and install
+download_url="https://download.moodle.org/download.php/direct/stable39/${moodle_release}.tgz"
+ # where we can get the latest version of moodle for our chosen releases.
+####
+
+# everything below should be version invariant.
+
+moodle_path="$moodle_parent/$moodle_dir"
+ # composing the parent plus directory name should get us to moodle.
+
+if [ ! -d "$moodle_path" ]; then
+ echo "There was no moodle installation found at: $moodle_path"
+ exit 1
+fi
+
+# where we unpack our temporary stuff.
+temp_install="$(mktemp -d /tmp/update_moodle.XXXXXX)"
+#echo temp install dir is: $temp_install
+if [ ! -d "$temp_install" ]; then
+ echo The temporary installation directory at: $temp_install could not be created.
+ exit 1
+fi
+
+# quit the running moodle instance.
+systemctl stop httpd
+exit_on_error stopping httpd process before moodle upgrade.
+
+# jump into our new work area.
+pushd "$temp_install"
+
+# get the latest moodle version. this could change over time,
+# but it's the best link i could find.
+wget "$download_url"
+exit_on_error downloading latest version of moodle.
+
+# use the feisty meow unpack script to extract the moodle data.
+unpack "${moodle_release}.tgz"
+exit_on_error unpacking latest version of moodle.
+
+# rename the old moodle directory to a unique name in the same area.
+old_moodle_path="$moodle_parent/moodle-$(basename $temp_install)"
+mv "$moodle_parent/$moodle_dir" "$old_moodle_path"
+exit_on_error renaming old version of moodle.
+
+# move the new stuff into place.
+mv "${moodle_release}/$moodle_dir" "$moodle_parent"/
+exit_on_error moving new version of moodle into place.
+
+# grab our important configuration files and put them back in the new directory.
+cp "$old_moodle_path/config.php" "$moodle_path"
+exit_on_error copying existing moodle configuration file: config.php
+
+echo -e "\
+====
+NOTE: This script does not copy any plugins or themes. If you are using\n\
+updated or specialized additions to moodle, please copy them from here:\n\
+ $old_moodle_path\n\
+into the new install at:\n\
+ $moodle_path\n\
+====\n\
+"
+
+# restart the running moodle instance.
+systemctl stop httpd
+exit_on_error starting httpd process after moodle upgrade.
+
+# sunshine and roses! we are through the gauntlet.
+
+++ /dev/null
-#!/bin/bash
-# keep_awake: sends a message to the screen from the background.
-#
-# This program is really just a way to start the keep_awake process in the
-# background instead of needing to start a subshell here. There was some
-# kind of snafu with the ksh environment variable $$ where it would always
-# record the previous shell's number and not the current one or something....
-#
-(bash $FEISTY_MEOW_SCRIPTS/tty/keep_awake_process.sh) &
#!/bin/bash
+
# This program is meant to be started by the program keep_awake and has
-# the basic guts that are meant to execute inside of a semi-perpetual loop.
+# the guts that are meant to execute inside of a semi-perpetual loop.
source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+#hmmm: is there still a process management thingy, referred to below, active in our scripts???
# save the process id for the goodbye program to deal with.
#echo $$ >>$TMP/trash.last_keep_awake_process
#don't let the shutdown guy know who we are; we want to keep running now.
# loop sort of forever.
while true; do
-# this version is for keeping a modem awake.
-# ping -c 7 www.gruntose.com >/dev/null
-
- echo "trying not to fall asleep at $(date_stringer)"
- sleep 120
+ echo -e "\n\ntrying not to fall asleep at $(date_stringer)\n"
+ # magical number of seconds to sleep...
+ sleep 64
done