Add scripts/one-time-setup.sh
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 27 Mar 2019 21:42:30 +0000 (17:42 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 27 Mar 2019 21:43:44 +0000 (17:43 -0400)
This will contain sanity checks and steps that should run once per git
clone.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
GETTING_STARTED.md
scripts/one-time-setup.sh [new file with mode: 0755]

index 6971176..7a374c7 100644 (file)
@@ -54,6 +54,9 @@ environment.  AKAROS_ROOT is the Akaros repo directory.  AKAROS_XCC_ROOT is a
 directory of your choosing where the toolchain will be installed (more on that
 in Section 3.1 below).
 
+I also suggest running `scripts/one-time-setup.sh`, once per `git clone`.  This
+performs various checks and other setup.  Check it out for details.
+
 The first step is to configure the kernel.  Targets like `config`,
 `menuconfig`, and some of the other KBuild targets work.  Defconfig gives you a
 default configuration.  For example, to config for 64-bit x86:
diff --git a/scripts/one-time-setup.sh b/scripts/one-time-setup.sh
new file mode 100755 (executable)
index 0000000..3bc4e55
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+if [ -z "$AKAROS_ROOT" ]
+then
+       echo Error: you need to set AKAROS_ROOT
+       exit -1
+fi
+
+if [ -z "$AKAROS_XCC_ROOT" ]
+then
+       echo Error: you need to set AKAROS_ROOT
+       exit -1
+fi