summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2019-04-04 12:46:04 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2019-04-04 13:52:09 +1100
commit5ceaf0f0d5e599ff42053242a671f7b0dce69677 (patch)
tree9f74ebdcff43c814f34b5dd26c892ebb722afdcc
parentded897555d75ba6f51669ba5e6178d01ea6d7806 (diff)
downloadtalos-op-build-5ceaf0f0d5e599ff42053242a671f7b0dce69677.tar.gz
talos-op-build-5ceaf0f0d5e599ff42053242a671f7b0dce69677.zip
Add op-build script
The current build instructions rely on sourcing op-build-env into the user's shell. But that assumes the user's shell is bash or sh. There's also no reason to pollute the user's shell with op-build related environment variables etc. So add an op-build script, which performs the same function and doesn't depend on what the user's shell is and is self contained. It just uses op-build-env, which is unchanged, so should have no impact on CI or other existing workflows. Update the build instructions to refer to it. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--README.md3
-rwxr-xr-xop-build8
2 files changed, 9 insertions, 2 deletions
diff --git a/README.md b/README.md
index f17c503c..536a7353 100644
--- a/README.md
+++ b/README.md
@@ -29,8 +29,7 @@ To build an image for a Palmetto system:
```
git clone --recursive git@github.com:open-power/op-build.git
cd op-build
-. op-build-env
-op-build palmetto_defconfig && op-build
+./op-build palmetto_defconfig && ./op-build
```
There are also default configurations for other platforms in
diff --git a/op-build b/op-build
new file mode 100755
index 00000000..38246711
--- /dev/null
+++ b/op-build
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+script_base="$(realpath $(dirname $0))"
+cd $script_base
+
+. op-build-env
+
+op-build $@
OpenPOWER on IntegriCloud