update the feisty meow codebase from its origin and run the regeneration
script to update the current user's feisty meow configuration.
+ whackem:
+ permanently delete files, rather than using safe delete (safedel). this
+ script will accept all the standard arguments to "rm".
+
revision control commands
=========================
##############
-# 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
+if [ -f /etc/bash.bashrc ]; then
+ # 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
+fi
##############
##############
-# 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
+if [ -f /etc/bash.bashrc ]; then
+ # 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
+fi
##############
a knife; one should probably put the knife right back down in those degenerate
(in the mathematical sense) cases. #WhatILearnedFromTheBoyScouts
-- fred t. hamster
+~
+Full of trust you left home,
+and soon learned to walk the Path--
+making yourself a friend to everyone
+and making everyone a friend.
+
+When the whole world is your friend,
+fear will find no place to call home.
+
+And when you make the mind your friend,
+you'll know what trust
+really means.
+
+Listen.
+
+I have followed this Path of friendship to its end.
+And I can say with absolute certainty--
+it will lead you home.
+
+ -- from "The First Free Women: Poems of the Early Buddhist Nuns",
+ by Matty Weingast
# specifies the version of the code that is being constructed here.
major=2
minor=140
-revision=115
+revision=116
build=420
# specifies the remainder of the version record info.
Install using apt (on Ubuntu or Debian-based OS):
$ sudo apt install libfile-which-perl libtext-diff-perl
+Install using yum (on Centos or similar distros):
+$ yum install perl-File-Which perl-Text-Diff
+
or Install using perl's CPAN:
$ sudo cpan install Text::Diff File::Which
+#!/bin/bash
# these metrics are how bogged down we are in to-do type items.
function calculate_weight()
{
local dir="$1"; shift
- local weight=$(find "$dir" -type f -exec echo \"{}\" ';' 2>/dev/null | grep -v "\.svn" | grep -v "\.git"| grep -v "\.basket" | grep -v "\.version" | grep -v "\.keep" | xargs ls -al | awk '{ print $5 }' | paste -sd+ | bc 2>/dev/null)
+ local weight=$(find "$dir" -type f -exec echo \"{}\" ';' 2>/dev/null | grep -v "\.svn" | grep -v "\.git"| grep -v "\.basket" | grep -v "\.version" | grep -v "\.keep" | xargs ls -al | awk '{ print $5 }' | paste -sd+ - | bc 2>/dev/null)
if [ -z "$weight" ]; then echo 0; else echo "$weight"; fi
}
function calculate_complexity()
{
local dir="$1"; shift
- local complexity=$(find "$dir" -type d | wc -l)
+ local complexity=$(find "$dir" -type d | wc -l | tr -d ' ')
if [ -z "$complexity" ]; then echo 0; else echo "$complexity"; fi
}
endif
ifneq "$(USE_SSL)" ""
- LIBS_USED += crypto
+ LIBS_USED += crypto ssl
endif
ifneq "$(USE_WXWIDGETS)" ""
DEPENDENCY_DEFINITIONS += NO_VERSION
DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(COMPILER_VERSION) -X/usr/include/c++/$(COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(COMPILER_VERSION)/include
-#protect other additions to make them only for debian?
-# COMPILER_HEADER_DIR := /usr/include /usr/local/include
- COMPILER_HEADER_DIR := /System/Library/Frameworks/Foundation.framework/Versions/C/Headers
+ COMPILER_HEADER_DIR := /usr/local/include /usr/include /System/Library/Frameworks/Foundation.framework/Versions/C/Headers
# "USE_XWIN" specifies that this project needs X window system support.
#USE_XWIN =
# COMPILER_LIBRARY_DIR = /lib64 /usr/lib64 /usr/local/lib64
# else
- COMPILER_LIBRARY_DIR = /usr/lib
-###/usr/local/lib
+ COMPILER_LIBRARY_DIR = /usr/lib /usr/local/lib
#/lib
# endif
# label if they're doing an su with the sudo.
function sudo() {
save_terminal_title
+ # hoist our X authorization info in case environment is passed along;
+ # this can allow root to use our display to show Xorg windows.
+ export IMPORTED_XAUTH="$(xauth list $DISPLAY)"
/usr/bin/sudo "$@"
retval=$?
restore_terminal_title
# if the user has sudo root access; we don't want to provide a custom
# profile for root.
fi
+ # chop off any email address style formatting to leave just the name.
+ custom_user="$(echo "$custom_user" | cut -f1 -d'@')"
save_terminal_title
if [ -z "$USER" -a ! -z "$CRONUSER" ]; then
export USER="$CRONUSER"
fi
+
+ # use the xauth info if we were given one in the environment.
+ # this allows root or other su'd identities to create windows with same
+ # display variable.
+ if [ ! -z "$DISPLAY" -a ! -z "$IMPORTED_XAUTH" ]; then
+ xauth add $IMPORTED_XAUTH
+ fi
##############
--- /dev/null
+fred
\ No newline at end of file
cp $HOME/.thunderbird/oqv30zg4.default/ImapMail/zooty.koeritz.com/msgFilterRules.dat $CLOUD_BASE/magic_cabinet/mail_filters/zooty_serene_hamstertronic_$(date_stringer).filters
exit_on_error "copying feistymeow.org filters"
-cp $HOME/.thunderbird/oqv30zg4.default/ImapMail/mail.eservices.virginia.edu/msgFilterRules.dat $CLOUD_BASE/magic_cabinet/mail_filters/uva_email_$(date_stringer).filters
-exit_on_error "copying UVa filters"
+#GONE: cp $HOME/.thunderbird/oqv30zg4.default/ImapMail/mail.eservices.virginia.edu/msgFilterRules.dat $CLOUD_BASE/magic_cabinet/mail_filters/uva_email_$(date_stringer).filters
+#GONE: exit_on_error "copying UVa filters"
fi
# run the source highlighter first if needed.
- /bin/less $EXTRA_OPTIONS "${@}"
+ /usr/bin/env less $EXTRA_OPTIONS "${@}"
}
##############
if [ "$OPERATING_SYSTEM" == "WIN32" ]; then
source "$BUILD_SCRIPTS_PATH/vis_stu_vars.sh"
else
- export LD_LIBRARY_PATH="$TARGETS_STORE"
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TARGETS_STORE"
fi
popd &>/dev/null # checking is over, jump back to the starting point.
perform_revctrl_action_on_file "$tempfile" do_revctrl_diff
exit_on_error "performing revision control action do_revctrl_diff on: $tempfile"
+rm "$tempfile"
+
restore_terminal_title
perform_revctrl_action_on_file "$tempfile" do_revctrl_careful_update
exit_on_error "doing a careful update on: $tempfile"
+rm "$tempfile"
+
# seems to be needed to cause a merge to be resolved.
git pull downstream master
# -m "unfortunate merge"
# make up a release name based on the version number.
local new_release="release-${new_version}"
# make a new branch for the release based on the dev branch.
-echo about to git checkout
+echo about to git checkout--hit enter
read line
git checkout -b $new_release dev
exit_on_error checking out a new branch called $new_release
# bump feisty meow version.
bash ./scripts/generator/next_version.sh
exit_on_error bumping version for feisty meow codebase
-echo about to commit
-read line
# check in the changes in the new release branch, which now includes a revised version.
+echo about to commit--hit enter
+read line
git commit -a
exit_on_error committing all changes
-echo about to check out master
+
+ # not sure if we really need to check in the release branch as a remote, but we like to see it in the list.
+echo about to push new release branch--hit enter
read line
+ git push --set-upstream origin "$new_release"
+
# grab out the master branch as the active one.
+echo about to check out master--hit enter
+read line
git checkout master
exit_on_error checking out master branch
-echo about to merge
-read line
# merge the master branch with the new release.
+echo about to merge--hit enter
+read line
git merge --no-ff $new_release
exit_on_error merging in the new release in master
# let the committer see the most recent changes.
# and useful comments for what has changed in this release, gathered from the gitk that
# we just launched. this should include all of the work on the development branch since
# the last release...
-echo about to TAG
+echo about to TAG--hit enter
read line
git tag -a $new_version
exit_on_error tagging new version as $new_version
-echo about to commit master branch with all those changes
-read line
# commit the full set of changes for the master branch now, including the tags.
+echo about to commit master branch with all those changes--hit enter
+read line
rcheckin .
exit_on_error checking in the changes in master branch
-echo switching to dev branch
-read line
# switch back to the dev branch.
+echo switching to dev branch--hit enter
+read line
git checkout dev
exit_on_error checking the dev branch out again
-echo merging in from master
-read line
# merge in the latest changes from master, which should only be the revised version really.
+echo merging in from release branch to dev--hit enter
+read line
git merge --no-ff $new_release
exit_on_error merging the release changes into the dev branch
# back to where we started.
perform_revctrl_action_on_file "$tempfile" do_revctrl_checkin
exit_on_error "doing a check-in on: $tempfile"
+rm "$tempfile"
+
restore_terminal_title
perform_revctrl_action_on_file "$tempfile" do_revctrl_report_new
exit_on_error "running revision control report"
+rm "$tempfile"
+
restore_terminal_title
perform_revctrl_action_on_file "$tempfile" do_revctrl_simple_update
exit_on_error "running revision control update"
+rm "$tempfile"
+
restore_terminal_title
perform_revctrl_action_on_file "$tempfile" do_revctrl_careful_update
exit_on_error "puffing out repository at: $tempfile"
+rm "$tempfile"
+
restore_terminal_title
svn diff .
exit_on_error "subversion diff"
elif [ -d ".git" ]; then
- git diff
+ git --no-pager diff
exit_on_error "git diff"
elif [ -d "CVS" ]; then
cvs diff .
--- /dev/null
+#!/bin/bash
+
+# reports whether a disk is spinning physical media or solid state.
+# if no drive is specified, then /dev/sda is the default.
+
+source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
+
+drive="$1"; shift
+
+# plug in a default drive if none is provided.
+if [ -z "$drive" ]; then drive="sda"; fi
+
+# chop off the /dev/ portion of the disk name, if it exists. also chop off
+# any partition numbers, since the script can only check whole drives (where,
+# so far at least, all partitions on a drive are the same type).
+if [[ "$drive" =~ ^/dev/.*$ ]]; then
+ drive="$(echo "$drive" | sed -e 's/^\/dev\///')"
+# echo "after mangle, drive is: '$drive'"
+fi
+
+#hmmm: could do the check on multiple drives if weren't so lazy.
+
+# let's make sure that the drive exists...
+if [ ! -e "/sys/block/${drive}/queue/rotational" ]; then
+ false || exit_on_error "failed to find a record for drive '$drive'"
+fi
+
+# the value for the block device's rotational parameter should be 1 for hard
+# disks and 0 for SSDs. apparently the linux kernel has supported this check
+# since version 2.6.29.
+if [ $(cat /sys/block/${drive}/queue/rotational) -eq 0 ]; then
+ echo "drive $drive is a solid state disk."
+else
+ echo "drive $drive is a spinning physical disk."
+fi
+
+