]> xenbits.xensource.com Git - people/gdunlap/raisin.git/.git/commitdiff
Allow the user's config to live outside of git
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Thu, 9 Apr 2015 15:11:45 +0000 (16:11 +0100)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Thu, 9 Apr 2015 19:23:52 +0000 (20:23 +0100)
Move the default config to "defconfig" and add config to .gitignore.
If config doesn't exist, then copy defconfig to it in common_init.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
---
CC: Stefano Stabellini <stefano.stabellini@citrix.com>
.gitignore
config [deleted file]
defconfig [new file with mode: 0644]
raise

index 47e9874b55d3dca1d96972b3f082d5020be99881..35a46c667ac468d846ca4c05393dfee414ac635a 100644 (file)
@@ -28,6 +28,7 @@ cscope.in.out
 cscope.out
 cscope.po.out
 .config
+config
 
 xen-dir
 xen-dir-remote
diff --git a/config b/config
deleted file mode 100644 (file)
index 2b37acc..0000000
--- a/config
+++ /dev/null
@@ -1,25 +0,0 @@
-# Config variables for raisin
-
-# Build config
-## Make command to run
-MAKE="make -j2"
-## Installation prefix (configure --prefix)
-PREFIX="/usr"
-## Install everything under DESTDIR
-## If you want to install under / run raise.sh -i
-DESTDIR=dist
-
-# Git urls. Use the http urls if you are behind a firewall.
-#XEN_UPSTREAM_URL="http://xenbits.xen.org/git-http/xen.git"
-#GRUB_UPSTREAM_URL="http://git.savannah.gnu.org/r/grub.git"
-#LIBVIRT_UPSTREAM_URL="https://gitorious.org/libvirt/libvirt.git"
-XEN_UPSTREAM_URL="git://xenbits.xen.org/xen.git"
-GRUB_UPSTREAM_URL="git://git.savannah.gnu.org/grub.git"
-LIBVIRT_UPSTREAM_URL="git://libvirt.org/libvirt.git"
-
-# Software versions. Leave blank if you want to avoid the build, like
-# this: GRUB_UPSTREAM_REVISION=
-# Grub and Libvirt needs Xen to build and run.
-XEN_UPSTREAM_REVISION="master"
-GRUB_UPSTREAM_REVISION="master"
-LIBVIRT_UPSTREAM_REVISION="master"
diff --git a/defconfig b/defconfig
new file mode 100644 (file)
index 0000000..2b37acc
--- /dev/null
+++ b/defconfig
@@ -0,0 +1,25 @@
+# Config variables for raisin
+
+# Build config
+## Make command to run
+MAKE="make -j2"
+## Installation prefix (configure --prefix)
+PREFIX="/usr"
+## Install everything under DESTDIR
+## If you want to install under / run raise.sh -i
+DESTDIR=dist
+
+# Git urls. Use the http urls if you are behind a firewall.
+#XEN_UPSTREAM_URL="http://xenbits.xen.org/git-http/xen.git"
+#GRUB_UPSTREAM_URL="http://git.savannah.gnu.org/r/grub.git"
+#LIBVIRT_UPSTREAM_URL="https://gitorious.org/libvirt/libvirt.git"
+XEN_UPSTREAM_URL="git://xenbits.xen.org/xen.git"
+GRUB_UPSTREAM_URL="git://git.savannah.gnu.org/grub.git"
+LIBVIRT_UPSTREAM_URL="git://libvirt.org/libvirt.git"
+
+# Software versions. Leave blank if you want to avoid the build, like
+# this: GRUB_UPSTREAM_REVISION=
+# Grub and Libvirt needs Xen to build and run.
+XEN_UPSTREAM_REVISION="master"
+GRUB_UPSTREAM_REVISION="master"
+LIBVIRT_UPSTREAM_REVISION="master"
diff --git a/raise b/raise
index 142956d077ab43d86eea4e4cef8a6c5960b9c992..ae435d95eeda89ce4c21ce0491091f5b68110026 100755 (executable)
--- a/raise
+++ b/raise
@@ -1,10 +1,5 @@
 #!/usr/bin/env bash
 
-# Include your defaults
-if [[ -e "./config" ]] ; then
-    . ./config
-fi
-
 # To use this as a library, set RAISIN_PATH appropriately
 [[ -z "$RAISIN_PATH" ]] && RAISIN_PATH="$PWD/lib"
 
@@ -14,6 +9,14 @@ fi
 . ${RAISIN_PATH}/git-checkout.sh
 . ${RAISIN_PATH}/build.sh
 
+# Include your defaults
+if [[ ! -e "./config" ]] ; then
+   echo "No config file found, copying default config"
+   cp defconfig config
+fi
+
+. ./config
+
 # Set up basic functionality
 common_init