Commit fb68c63c authored by Arie Peterson's avatar Arie Peterson

Change initrd to differential layout

parent 68303289
......@@ -4,27 +4,23 @@ set -e
# Directory where this script is located.
scriptDir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")
buildDir="${scriptDir}/build"
initrdDir="${scriptDir}/crypt-initrd-extra-files"
# Copy api server binary to initrd build dir.
cp "${scriptDir}/cryptops/bin/cryptops-api" "${buildDir}/bin/cryptops-api"
cp "${scriptDir}/cryptops/bin/cryptops-api" "${initrdDir}/bin/cryptops-api"
# Store api server version information.
versionInfoFile="${buildDir}/etc/cryptops-api/version.txt"
versionInfoFile="${initrdDir}/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"
cp "${scriptDir}/cryptops/cryptops-client/cryptops-client" "${initrdDir}/usr/bin/cryptops-client"
cp "${scriptDir}/cryptops/cryptops-client/local/jq" "${initrdDir}/usr/bin/jq"
# Store client version information.
versionInfoFile="${buildDir}/etc/cryptops-client/version.txt"
versionInfoFile="${initrdDir}/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}"
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.