summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjonas <jonas@8f53b18a-e215-0410-8885-9f593d34873e>2006-10-14 10:57:42 +0000
committerjonas <jonas@8f53b18a-e215-0410-8885-9f593d34873e>2006-10-14 10:57:42 +0000
commitbd1971c6a02fec5a2ff02314c893aa0b3519aa38 (patch)
tree0b0e75ef16f7a7b333e7f438475b245353ac4369
parent45c6726bd3510ac54bf32a6d08bf2ed24c78b479 (diff)
Move host and target configs to subdirs. Allow either using a shared config or override with a custom one. Don't exit 0 in common-settings.
git-svn-id: svn+ssh://xayide/home/jonas/private_svn/fleshybrid/homebase@37 8f53b18a-e215-0410-8885-9f593d34873e
-rw-r--r--common-settings33
-rw-r--r--host1
-rw-r--r--hosts/homebase (renamed from host.cfg)0
-rw-r--r--target1
l---------target.cfg1
-rw-r--r--targets/chr (renamed from config-chr)0
-rw-r--r--targets/chr.diff (renamed from config-chr.diff)0
-rw-r--r--targets/dgih (renamed from config-dgih)0
-rw-r--r--targets/dgih.diff (renamed from config-dgih.diff)0
-rw-r--r--targets/homebase (renamed from config-homebase)0
-rw-r--r--targets/jones (renamed from config-jones)0
-rw-r--r--targets/lasse (renamed from config-lasse)0
12 files changed, 31 insertions, 5 deletions
diff --git a/common-settings b/common-settings
index 84d49d1..b39952a 100644
--- a/common-settings
+++ b/common-settings
@@ -5,8 +5,33 @@
set -e
. ./defaults.cfg || exit 1
-. ./host.cfg || exit 1
-. ./target.cfg || exit 1
-. ./defaults-aftermath.cfg || exit 1
-exit 0
+shareddir="hosts"
+sharedfile="host"
+customfile="host.cfg"
+if [ -f "$customfile" ]; then
+ if [ -f "$sharedfile" ]; then
+ echo "W: Ignoring shared host config \"$sharedfile\" - using custom \"$customfile\" instead."
+ fi
+ . "$customfile"
+elif [ -f "$sharedfile" ]; then
+ . "$shareddir"/`cat "$sharedfile" |head -1`
+else
+ echo "E: No host config found - either mention shared host config in \"$sharedfile\" or write custom file \"$customfile\"."
+fi
+
+shareddir="targets"
+sharedfile="target"
+customfile="target.cfg"
+if [ -f "$customfile" ]; then
+ if [ -f "$sharedfile" ]; then
+ echo "W: Ignoring shared target config \"$sharedfile\" - using custom \"$customfile\" instead."
+ fi
+ . "$customfile"
+elif [ -f "$sharedfile" ]; then
+ . "$shareddir"/`cat "$sharedfile" |head -1`
+else
+ echo "E: No target config found - either mention shared host config in \"$sharedfile\" or write custom file \"$customfile\"."
+fi
+
+. ./defaults-aftermath.cfg || exit 1
diff --git a/host b/host
new file mode 100644
index 0000000..cb34c14
--- /dev/null
+++ b/host
@@ -0,0 +1 @@
+homebase
diff --git a/host.cfg b/hosts/homebase
index 5a6dc66..5a6dc66 100644
--- a/host.cfg
+++ b/hosts/homebase
diff --git a/target b/target
new file mode 100644
index 0000000..cb34c14
--- /dev/null
+++ b/target
@@ -0,0 +1 @@
+homebase
diff --git a/target.cfg b/target.cfg
deleted file mode 120000
index 9bea7d1..0000000
--- a/target.cfg
+++ /dev/null
@@ -1 +0,0 @@
-config-homebase \ No newline at end of file
diff --git a/config-chr b/targets/chr
index 0d66ca4..0d66ca4 100644
--- a/config-chr
+++ b/targets/chr
diff --git a/config-chr.diff b/targets/chr.diff
index 3546565..3546565 100644
--- a/config-chr.diff
+++ b/targets/chr.diff
diff --git a/config-dgih b/targets/dgih
index 5daa648..5daa648 100644
--- a/config-dgih
+++ b/targets/dgih
diff --git a/config-dgih.diff b/targets/dgih.diff
index dc4dd5d..dc4dd5d 100644
--- a/config-dgih.diff
+++ b/targets/dgih.diff
diff --git a/config-homebase b/targets/homebase
index da593c9..da593c9 100644
--- a/config-homebase
+++ b/targets/homebase
diff --git a/config-jones b/targets/jones
index ff18f24..ff18f24 100644
--- a/config-jones
+++ b/targets/jones
diff --git a/config-lasse b/targets/lasse
index 9c43d56..9c43d56 100644
--- a/config-lasse
+++ b/targets/lasse