#!/bin/bash
-source "$FEISTY_MEOW_DIR/scripts/build/seek_all_source.sh"
+source "$FEISTY_MEOW_SCRIPTS/build/seek_all_source.sh"
function strip_file {
file="$1"
# we always remove dos slashes in favor of forward slashes.
echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\([a-zA-Z]\):\/\(.*\)/\/\1\/\2/'
}
-
- # su function: makes su perform a login.
- # for some OSes, this transfers the X authority information to the new login.
- function su() {
+
+ # returns a successful value (0) if this system is debian or ubuntu.
+ function debian_like() {
# decide if we think this is debian or ubuntu or a variant.
DEBIAN_LIKE=$(if [ ! -z "$(grep -i debian /etc/issue)" \
-o ! -z "$(grep -i ubuntu /etc/issue)" ]; then echo 1; else echo 0; fi)
-
if [ $DEBIAN_LIKE -eq 1 ]; then
+ # success; this is debianish.
+ return 0
+ else
+ # this seems like some other OS.
+ return 1
+ fi
+ }
+
+ # su function: makes su perform a login.
+ # for some OSes, this transfers the X authority information to the new login.
+ function su() {
+ if debian_like; then
# debian currently requires the full version which imports X authority
# information for su.
if [ -z "$wheres_nechung" ]; then
echo "The nechung oracle program cannot be found. You may want to consider"
echo "rebuilding the feisty meow applications with this command:"
- echo " bash $FEISTY_MEOW_DIR/scripts/generator/bootstrap_build.sh"
+ echo " bash $FEISTY_MEOW_SCRIPTS/generator/bootstrap_build.sh"
else
$wheres_nechung
fi
if [ -z "$FEISTY_MEOW_DIR" ]; then
if [ -d "$HOME/feisty_meow" ]; then
export FEISTY_MEOW_DIR="$HOME/feisty_meow"
- export FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_DIR/scripts"
+ export FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_SCRIPTS"
fi
fi
# we need to know the feisty meow directory, or we bail.
if [ -z "$FEISTY_MEOW_DIR" ]; then return; fi
# pick from our expected generator folder, but make sure it's there...
- buildvars="$FEISTY_MEOW_DIR/scripts/generator/build_variables.sh"
+ buildvars="$FEISTY_MEOW_SCRIPTS/generator/build_variables.sh"
if [ -f "$buildvars" ]; then
# yep, that one looks good, so pull in the build defs.
source "$buildvars" "$buildvars"
if [ "$clean_src" == "clean" -o "$clean_src" == "CLEAN" ]; then
echo $(date): " ** aggressive cleaning activated..."
- perl "$FEISTY_MEOW_DIR/scripts/files/zapdirs.pl" "$FEISTY_MEOW_DIR" >>"$CRUDFILE"
+ perl "$FEISTY_MEOW_SCRIPTS/files/zapdirs.pl" "$FEISTY_MEOW_DIR" >>"$CRUDFILE"
fi
echo $(date): "cleaned [$choprepo]."
--- /dev/null
+#!/bin/bash
+
+source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
+
+if debian_like; then
+ dpkg -la | grep $*
+ exit $?
+fi
+
+rpm_available="$(which rpm)"
+if [ ! -z "$rpm_available" ]; then
+#is that the right phrase for rpm? somewhat forgotten.
+ rpm -qa | grep $*
+ exit $?
+fi
+
+yum_available="$(which yum)"
+if [ ! -z "$yum_available" ]; then
+ yum list | grep $*
+ exit $?
+fi
+
+echo "Could not deduce what type of OS this is; missing package listing commands."
+exit 1
#!/bin/bash
# writes an uptime report to a file in the home directory which is named
# after the current machine's hostname.
-source "$FEISTY_MEOW_DIR/scripts/core/functions.sh"
+source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
export hosty=$(hostname | sed -e 's/^\([^.]*\).*$/\1/')
export REPORT_FILE="$HOME/${hosty}_uptime.log"
echo "$(date_stringer) -- $(uptime)" >>"$REPORT_FILE" 2>&1