automatically building correct PERLLIB now for our script folders.
alias bye='. $FEISTY_MEOW_SCRIPTS/users/goodbye.sh'
# redoes fred's set of custom scripts.
-alias recustomize='cpdiff $FEISTY_MEOW_DIR/examples/custom_overrides/fred $FEISTY_MEOW_GENERATED/custom'
+alias recustomize='cpdiff $FEISTY_MEOW_DIR/examples/custom_overrides/fred $FEISTY_MEOW_GENERATED/custom; regenerate'
# makes root user's home directory's permissions right.
alias reroot='chown -R root:root /root'
# call the generated aliases file, if it exists.
if [ -f "$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh" ]; then
- if [ ! -z "$SHELL_DEBUG" ]; then echo launching generated aliases.; fi
+ if [ ! -z "$SHELL_DEBUG" ]; then echo loading script aliases...; fi
source "$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh"
- if [ ! -z "$SHELL_DEBUG" ]; then echo done with generated aliases.; fi
+ if [ ! -z "$SHELL_DEBUG" ]; then echo done loading script aliases.; fi
fi
# remove the fredization macro if it was defined, helping to avoid running
foreach $i (@ALIAS_DEFINITION_FILES) {
open CURR_ALIASER, "<$i" or die "cannot open current alias file $i";
foreach $line (<CURR_ALIASER>) {
- print GENOUT "$line\n";
+ print GENOUT "$line";
}
}
system("chmod -R u+x \"$BINDIR\"/*");
}
-
# generate the first set of alias files that are defined in the core
# and custom scripts directories.
&rebuild_script_aliases;
-###system("bash \"$FEISTY_MEOW_SCRIPTS\"/core/unter_alia.sh");
# trash the old versions.
unlink("$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh");
+++ /dev/null
-#!/usr/bin/perl
-
-###############################################################################
-# #
-# Name : inc_num #
-# Author : Chris Koeritz #
-# Rights : Copyright (C) 1996-$now by Author #
-# #
-# Purpose: #
-# #
-# Operates on a number stored in a text file. the number can be retrieved #
-# for whatever purpose or it can be incremented. #
-# #
-###############################################################################
-# This program is free software; you can redistribute it and/or modify it #
-# under the terms of the GNU General Public License as published by the Free #
-# Software Foundation; either version 2 of the License or (at your option) #
-# any later version. See: "http://www.gruntose.com/Info/GNU/GPL.html" for a #
-# version of the License. Please send any updates to "fred@gruntose.com". #
-###############################################################################
-
-# A number is retrieved from the passed in filename and returned.
-sub get_number {
- local($number_file) = @_;
-#print "num file is $number_file\n";
- open(NUMBERING, "$number_file");
- local($number) = int(<NUMBERING>);
- if ($number <= 0) { $number = 1; }
- if ($number < 10) { $number = '0'.$number; }
- if ($number < 100) { $number = '0'.$number; }
- if ($number < 1000) { $number = '0'.$number; }
- close(NUMBERING);
- return $number;
-}
-
-# the number in the passed filename is increased.
-sub next_number {
- local($number_file) = @_;
- local($number) = &get_number($number_file);
- if ($number < 0) { $number = '0000'; }
- $number++;
- if ($number > 9999) { $number = '0000'; }
- open(NUMBERING, "> $number_file");
-#print "number is now $number\n";
- print NUMBERING "$number\n";
- close(NUMBERING);
-}
-
-# stores the number specified into the file specified.
-sub store_number {
- local($number, $number_file) = @_;
-#print "storing $number into $number_file\n";
- open(NUMBERING, "> $number_file");
- print NUMBERING "$number\n";
- close(NUMBERING);
-}
-
-1;
-
+++ /dev/null
-#!/bin/bash
-COMMAND='play -v 10'
-
-COUNT=$#
-if [ $COUNT -ne 1 -o ! -d $1 ]; then
- echo random_iter needs a directory name where the files to be randomly
- echo chosen from are located.
- \exit 0
-fi
-
-NUMBER_OF_FILES=$(ls -1 $1/* | wc | awk '{ print $1; }')
-
-if [ $NUMBER_OF_FILES -lt 1 ]; then
- echo There are no files in $1.
- \exit 0
-fi
-
-RANDOM_CHOICE=$(expr $RANDOM % $NUMBER_OF_FILES + 1)
-CURRENT_PLACE=1
-for i in $1/*; do
- if [ $CURRENT_PLACE = $RANDOM_CHOICE ]; then
- $COMMAND $i
- \exit 0
- fi
- CURRENT_PLACE=$(expr $CURRENT_PLACE + 1)
-done
if [ "$OS" != "Windows_NT" ]; then
PERLLIB+="/usr/lib/perl5"
else
+
#echo "the scripts dir is $FEISTY_MEOW_SCRIPTS"
- FEISTY_MEOW_SCRIPTS="$(echo $FEISTY_MEOW_SCRIPTS | sed -e 's/\\/\//g')"
- FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_SCRIPTS"
+# FEISTY_MEOW_SCRIPTS="$(echo $FEISTY_MEOW_SCRIPTS | sed -e 's/\\/\//g')"
+# FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_SCRIPTS"
#echo "the scripts dir is now $FEISTY_MEOW_SCRIPTS"
+
export PERLIO=:perlio
- # choose perl's IO over the system's so we can handle file bytes exactly.
+ # choose perl's IO over the ms-windows version so we can handle file
+ # bytes properly.
fi
-#make this automatic!
-PERLLIB+=":$FEISTY_MEOW_SCRIPTS/core:$FEISTY_MEOW_SCRIPTS/text:$FEISTY_MEOW_SCRIPTS/files:$FEISTY_MEOW_SCRIPTS/archival"
+# iterate across our sub-directories and find the perl scripts.
+# this currently only looks one level down.
+for i in $FEISTY_MEOW_SCRIPTS/*; do
+ if [ -d "$i" ]; then
+ # check if there is a perl file present; add the folder to PERLLIB if so.
+ ls $i/*.pl &>/dev/null
+ if [ $? -eq 0 ]; then
+ PERLLIB+=":$i"
+ fi
+ fi
+done
+#echo PERLLIB is now $PERLLIB
# set this so nechung can find its data.
export NECHUNG=$LIBDIR/database/fortunes.dat
--- /dev/null
+#!/usr/bin/perl
+
+###############################################################################
+# #
+# Name : inc_num #
+# Author : Chris Koeritz #
+# Rights : Copyright (C) 1996-$now by Author #
+# #
+# Purpose: #
+# #
+# Operates on a number stored in a text file. the number can be retrieved #
+# for whatever purpose or it can be incremented. #
+# #
+###############################################################################
+# This program is free software; you can redistribute it and/or modify it #
+# under the terms of the GNU General Public License as published by the Free #
+# Software Foundation; either version 2 of the License or (at your option) #
+# any later version. See: "http://www.gruntose.com/Info/GNU/GPL.html" for a #
+# version of the License. Please send any updates to "fred@gruntose.com". #
+###############################################################################
+
+# A number is retrieved from the passed in filename and returned.
+sub get_number {
+ local($number_file) = @_;
+#print "num file is $number_file\n";
+ open(NUMBERING, "$number_file");
+ local($number) = int(<NUMBERING>);
+ if ($number <= 0) { $number = 1; }
+ if ($number < 10) { $number = '0'.$number; }
+ if ($number < 100) { $number = '0'.$number; }
+ if ($number < 1000) { $number = '0'.$number; }
+ close(NUMBERING);
+ return $number;
+}
+
+# the number in the passed filename is increased.
+sub next_number {
+ local($number_file) = @_;
+ local($number) = &get_number($number_file);
+ if ($number < 0) { $number = '0000'; }
+ $number++;
+ if ($number > 9999) { $number = '0000'; }
+ open(NUMBERING, "> $number_file");
+#print "number is now $number\n";
+ print NUMBERING "$number\n";
+ close(NUMBERING);
+}
+
+# stores the number specified into the file specified.
+sub store_number {
+ local($number, $number_file) = @_;
+#print "storing $number into $number_file\n";
+ open(NUMBERING, "> $number_file");
+ print NUMBERING "$number\n";
+ close(NUMBERING);
+}
+
+1;
+