From: Chris Koeritz Date: Sat, 17 Sep 2016 21:53:07 +0000 (-0400) Subject: separated recustomize function out as separate script. added bin.ant and bin.eclipse... X-Git-Tag: 2.140.90~450 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=bbad9b62040c6192abde3808b1317244b56fc9ec;p=feisty_meow.git separated recustomize function out as separate script. added bin.ant and bin.eclipse as junk files. other minor changes. --- diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 7edaa007..b883b470 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -393,45 +393,8 @@ if [ -z "$skip_all" ]; then echo $(which $to_find) } - # copies a set of custom scripts into the proper location for feisty meow - # to merge their functions and aliases with the standard set. - function recustomize() - { - user="$1"; shift - if [ -z "$user" ]; then - # use our default example user if there was no name provided. - user=fred - fi - if [ ! -d "$FEISTY_MEOW_APEX/customizing/$user" ]; then - echo "The customization folder provided for $user should be:" - echo " '$FEISTY_MEOW_APEX/customizing/$user'" - echo "but that folder does not exist. Skipping customization." - return 1 - fi - regenerate >/dev/null - pushd "$FEISTY_MEOW_LOADING_DOCK/custom" &>/dev/null - local incongruous_files="$(bash "$FEISTY_MEOW_SCRIPTS/files/list_non_dupes.sh" "$FEISTY_MEOW_APEX/customizing/$user" "$FEISTY_MEOW_LOADING_DOCK/custom")" - -#echo "the incongruous files list is: $incongruous_files" - # disallow a single character result, since we get "*" as result when nothing exists yet. - if [ ${#incongruous_files} -ge 2 ]; then - echo "cleaning unknown older overrides..." - perl "$FEISTY_MEOW_SCRIPTS/files/safedel.pl" $incongruous_files - echo - fi - popd &>/dev/null - echo "copying custom overrides for $user" - mkdir -p "$FEISTY_MEOW_LOADING_DOCK/custom" 2>/dev/null - perl "$FEISTY_MEOW_SCRIPTS/text/cpdiff.pl" "$FEISTY_MEOW_APEX/customizing/$user" "$FEISTY_MEOW_LOADING_DOCK/custom" - if [ -d "$FEISTY_MEOW_APEX/customizing/$user/scripts" ]; then - echo "copying custom scripts for $user" - \cp -R "$FEISTY_MEOW_APEX/customizing/$user/scripts" "$FEISTY_MEOW_LOADING_DOCK/custom/" - fi - echo - regenerate - } - -#uhhh, this does what now? +#hmmm: improve this by not adding the link +# if already there, or if the drive is not valid. function add_cygwin_drive_mounts() { for i in c d e f g h q z ; do ln -s /cygdrive/$i $i diff --git a/scripts/core/recustomize.sh b/scripts/core/recustomize.sh new file mode 100644 index 00000000..896e9f0b --- /dev/null +++ b/scripts/core/recustomize.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# copies a set of custom scripts into the proper location for feisty meow +# to merge their functions and aliases with the standard set. + + +source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" + +# function recustomize() +#{ + +user="$1"; shift +if [ -z "$user" ]; then + # use our default example user if there was no name provided. + user=fred +fi +if [ ! -d "$FEISTY_MEOW_APEX/customizing/$user" ]; then + echo "The customization folder provided for $user should be:" + echo " '$FEISTY_MEOW_APEX/customizing/$user'" + echo "but that folder does not exist. Skipping customization." + return 1 +fi +regenerate >/dev/null +pushd "$FEISTY_MEOW_LOADING_DOCK/custom" &>/dev/null +incongruous_files="$(bash "$FEISTY_MEOW_SCRIPTS/files/list_non_dupes.sh" "$FEISTY_MEOW_APEX/customizing/$user" "$FEISTY_MEOW_LOADING_DOCK/custom")" + +#echo "the incongruous files list is: $incongruous_files" +# disallow a single character result, since we get "*" as result when nothing exists yet. +if [ ${#incongruous_files} -ge 2 ]; then + echo "cleaning unknown older overrides..." + perl "$FEISTY_MEOW_SCRIPTS/files/safedel.pl" $incongruous_files + echo +fi +popd &>/dev/null +echo "copying custom overrides for $user" +mkdir -p "$FEISTY_MEOW_LOADING_DOCK/custom" 2>/dev/null +perl "$FEISTY_MEOW_SCRIPTS/text/cpdiff.pl" "$FEISTY_MEOW_APEX/customizing/$user" "$FEISTY_MEOW_LOADING_DOCK/custom" +if [ -d "$FEISTY_MEOW_APEX/customizing/$user/scripts" ]; then + echo "copying custom scripts for $user" + \cp -R "$FEISTY_MEOW_APEX/customizing/$user/scripts" "$FEISTY_MEOW_LOADING_DOCK/custom/" +fi +echo +regenerate +#} + + diff --git a/scripts/files/filename_helper.pl b/scripts/files/filename_helper.pl index a6632cf5..4117df89 100644 --- a/scripts/files/filename_helper.pl +++ b/scripts/files/filename_helper.pl @@ -331,7 +331,7 @@ sub important_filename { # at the front, we will match only the whole string. double slashes are # used before periods to ensure we match a real period character. local(@junk_files) = ("~", "^\\.#.*", "^\\._.*", "\\.aps", "\\.bak", - "^binaries", + "^binaries", "^bin.ant", "^bin.eclipse", "\\.clw", "^cpdiff_tmp\\.txt", "^\\.ds_store", "^diffs\\.txt", "^diff_tmp\\.txt", "\\.dsp", "\\.dsw", "\\.gid", "gmon\\.out", "\\.isr", "^isconfig\\.ini", "\\.log", "^manifest.txt", "^obj", diff --git a/scripts/rev_control/checkin.sh b/scripts/rev_control/checkin.sh index ed58906f..965e67ad 100644 --- a/scripts/rev_control/checkin.sh +++ b/scripts/rev_control/checkin.sh @@ -1,6 +1,6 @@ #!/bin/bash -# checks in all the folders present in the REPOSITORY_LIST variable. +# checkin: checks in all the folders present in the REPOSITORY_LIST variable. source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" source "$FEISTY_MEOW_SCRIPTS/rev_control/version_control.sh" diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 391497df..432d3263 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -112,7 +112,7 @@ function do_checkin() return 1 fi pushd "$directory" &>/dev/null - retval=0 # normally successful. + local retval=0 # normally successful. if [ -d "CVS" ]; then cvs ci . retval=$? @@ -141,7 +141,7 @@ function do_diff { local directory="$1"; shift pushd "$directory" &>/dev/null - retval=0 # normally successful. + local retval=0 # normally successful. # only update if we see a repository living there. if [ -d ".svn" ]; then @@ -160,7 +160,7 @@ function do_report_new { local directory="$1"; shift pushd "$directory" &>/dev/null - retval=0 # normally successful. + local retval=0 # normally successful. # only update if we see a repository living there. if [ -d ".svn" ]; then @@ -215,8 +215,7 @@ function squash_first_few_crs() function do_update() { directory="$1"; shift - # plan on success for now. - retval=0 + local retval=0 # plan on success for now. pushd "$directory" &>/dev/null if [ -d "CVS" ]; then cvs update . | squash_first_few_crs