Browse Source

Add a script to fetch and compile apex, and bind in apex binaries in the harvey profile

Signed-off-by: John Floren <john@jfloren.net>
John Floren 3 years ago
parent
commit
7e68dade77
3 changed files with 24 additions and 0 deletions
  1. 1 0
      .gitignore
  2. 22 0
      getapex.sh
  3. 1 0
      usr/harvey/lib/profile

+ 1 - 0
.gitignore

@@ -88,3 +88,4 @@ util/harvey.raw
 /plan9_amd64/
 /usr/harvey/lib/cache/
 compile_commands.json
+apex

+ 22 - 0
getapex.sh

@@ -0,0 +1,22 @@
+#!/bin/sh
+set -e
+
+# We assume you're running this from the Harvey dir
+HARVEY=`pwd`
+
+if [ -z "$OS" ] || [ -z "$ARCH" ]
+then
+	echo We need \$OS and \$ARCH set.
+	exit
+fi
+
+if [ ! -e apex ]
+then
+	git clone https://github.com/Harvey-OS/apex.git
+fi
+
+cd apex
+APEX=`pwd`
+cd src
+APEX=$APEX HARVEY=$HARVEY OS=$OS ARCH=$ARCH make
+cd ../..

+ 1 - 0
usr/harvey/lib/profile

@@ -1,5 +1,6 @@
 bind -a $home/bin/rc /bin
 bind -a $home/bin/$cputype /bin
+bind -a /apex/amd64/bin /bin
 bind -c tmp /tmp
 
 # in case we're running off a read-only medium, use ramfs for tmp