sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] BZR Change 10 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>
- From: bzr AT mail.sourcemage.org
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] BZR Change 10 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>
- Date: Wed, 12 Apr 2006 00:40:06 -0500
------------------------------------------------------------
revno: 10
committer: David Brown <dmlb2000@dmlb2004>
branch nick: stage-root
timestamp: Tue 2006-04-11 22:32:44 -0700
message:
more updates for confmeld
talked to sandall about it since I'm really writing the thing and I am
making
something uniq (to us) I have the copyright to it and I'm giving that to
the
Source Mage Developers :) so I don't need to have any of the other copyright
stuff on there since they have nothing to do with this.
also added functions to list off files and uniq files but those are going
to
change since the directory structure changed
=== modified file 'usr/sbin/confmeld'
--- usr/sbin/confmeld
+++ usr/sbin/confmeld
@@ -1,10 +1,8 @@
#!/bin/bash
#---------------------------------------------------------------------
-## @Synopsis cast is the spell installation utility. It can be called by the
user or by sorcery
-## @Copyright Original version Copyright 2001 by Kyle Sallee
-## @Copyright Some parts copyright 2002 Anders Bruun Olsen et al
+## @Synopsis merge the config files located in the config stage directory to
the system.
## @Copyright Other additions/corrections Copyright 2002 by the Source Mage
Team
-## Script to cast spells.
+## Script to install staged config files.
#---------------------------------------------------------------------
#-----
@@ -26,5 +24,51 @@
exit 1
}
+#--------------------------------------------------------------------
+## List all the configs in the config stage root
+##
+## @stdout a list of all configs in the config stage root
+#--------------------------------------------------------------------
+function all_config_files()
+{
+ find $CONFIG_STAGE_DIRECTORY
+}
+
+#--------------------------------------------------------------------
+## List all uniq config files in the config stage directory
+##
+## @stdout a list of all uniq configs in the stage directory
+#--------------------------------------------------------------------
+function all_uniq_config_files()
+{
+ all_config_files |
+ while read file
+ do
+ echo ${file%.*}
+ done | uniq
+}
+
+#--------------------------------------------------------------------
+## Main
+##
+## No real arguments get all the config files and start installing
+## them to the system using install_config_file
+#--------------------------------------------------------------------
+function main()
+{
+ local target
+ all_config_files |
+ while read file
+ do
+ target=${file/$CONFIG_STAGE_DIRECTORY/}
+ target=${target%.*}
+ if [[ -f $file ]]
+ then
+ install_config_file $file $target
+ fi
+ done
+}
+
+
. /etc/sorcery/config
-help
+main "$@"
-
[SM-Commit] BZR Change 10 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>,
bzr, 04/12/2006
-
Re: [SM-Commit] BZR Change 10 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>,
Jeremy Blosser (emrys), 04/12/2006
-
Re: [SM-Commit] BZR Change 10 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>,
David Brown, 04/12/2006
-
Re: [SM-Commit] BZR Change 10 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>,
Jeremy Blosser (emrys), 04/12/2006
-
Re: [SM-Commit] BZR Change 10 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>,
Arwed von Merkatz, 04/12/2006
- Re: [SM-Commit] BZR Change 10 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>, Jeremy Blosser (emrys), 04/12/2006
-
Re: [SM-Commit] BZR Change 10 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>,
Arwed von Merkatz, 04/12/2006
-
Re: [SM-Commit] BZR Change 10 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>,
Jeremy Blosser (emrys), 04/12/2006
-
Re: [SM-Commit] BZR Change 10 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>,
David Brown, 04/12/2006
-
Re: [SM-Commit] BZR Change 10 to stage-root sorcery by David Brown <dmlb2000@dmlb2004>,
Jeremy Blosser (emrys), 04/12/2006
Archive powered by MHonArc 2.6.24.