Commit 01940fb4 authored by Arie Peterson's avatar Arie Peterson

Add build script

parent 29ef11be
#!/bin/bash
set -e
# Directory where this script is located.
scriptDir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")
buildDir="${scriptDir}/build"
# Copy api server binary to initrd build dir.
cp "${scriptDir}/cryptops/bin/cryptops-api" "${buildDir}/bin/cryptops-api"
# Store api server version information.
versionInfoFile="${buildDir}/etc/cryptops-api/version.txt"
cd "${scriptDir}/cryptops"
git rev-parse --abbrev-ref HEAD > "${versionInfoFile}"
git log -1 >> "${versionInfoFile}"
# Copy api client script and associated binaries to initrd build dir.
cp "${scriptDir}/cryptops/cryptops-client/cryptops-client" "${buildDir}/usr/bin/cryptops-client"
cp "${scriptDir}/cryptops/cryptops-client/local/jq" "${buildDir}/usr/bin/jq"
# Store client version information.
versionInfoFile="${buildDir}/etc/cryptops-client/version.txt"
cd "${scriptDir}/cryptops/cryptops-client"
git rev-parse --abbrev-ref HEAD > "${versionInfoFile}"
git log -1 >> "${versionInfoFile}"
cd "${buildDir}"
find . | cpio -H newc -o | gzip - > "${scriptDir}/ramdisk"
cd "${scriptDir}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment