Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] BZR Change 20 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: bzr AT mail.sourcemage.org
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] BZR Change 20 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>
  • Date: Fri, 14 Apr 2006 15:10:03 -0500

------------------------------------------------------------
revno: 20
committer: David Brown <dmlb2000@dmlb2004>
branch nick: stage-root
timestamp: Fri 2006-04-14 13:06:08 -0700
message:
removed all `` and replaced with $()
added $INSTALL_ROOT to the install location for the config file
changed the rm -rf's with rm_source_dir's

=== modified file 'usr/sbin/confmeld'
--- usr/sbin/confmeld
+++ usr/sbin/confmeld
@@ -93,7 +93,7 @@
local last_spell=""
local last_sdate=""

- for file in `all_config_files`
+ for file in $(all_config_files)
do
parse_stage_config_path $file spell sdate target &&
if [[ -f $file && $target ]]
@@ -101,25 +101,35 @@
message "${MESSAGE_COLOR}$spell cast on $sdate has
config${DEFAULT_COLOR}"
message "${MESSAGE_COLOR}$file to be merged with
/$target${DEFAULT_COLOR}"
tablet_set_spell $spell &&
- install_config_file $file /$target
+ install_config_file $file $INSTALL_ROOT/$target
+ #
+ # since we use find we need to remove empty directories
+ # so if the spell or the date changes then we remove the directory so
+ # CONFIG_STAGE_DIRECTORY should always be empty after you complete the
+ # call to confmeld
+ #
if [[ $last_sdate && $last_sdate != $sdate ]]
then
message "${MESSAGE_COLOR}Removing dirs and files in config stage
area.${DEFAULT_COLOR}"
- rm -vrf $CONFIG_STAGE_DIRECTORY/$last_spell/$last_sdate
+ rm_source_dir $CONFIG_STAGE_DIRECTORY/$last_spell/$last_sdate
fi
if [[ $last_spell && $last_spell != $spell ]]
then
message "${MESSAGE_COLOR}Removing dirs and files in config stage
area.${DEFAULT_COLOR}"
- rm -vrf $CONFIG_STAGE_DIRECTORY/$last_spell
+ rm_source_dir $CONFIG_STAGE_DIRECTORY/$last_spell
fi
last_sdate="$sdate"
last_spell="$spell"
fi
done
+ #
+ # final check for removing spell directories this is mainly a check so that
+ # empty directories will get removed
+ #
if [[ $last_spell ]]
then
message "${MESSAGE_COLOR}Removing dirs and files in config stage
area.${DEFAULT_COLOR}"
- rm -vrf $CONFIG_STAGE_DIRECTORY/$last_spell
+ rm_source_dir $CONFIG_STAGE_DIRECTORY/$last_spell
fi
}





  • [SM-Commit] BZR Change 20 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>, bzr, 04/14/2006

Archive powered by MHonArc 2.6.24.

Top of Page