summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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