Commit 5d92d69a authored by Ophélie Gagnard's avatar Ophélie Gagnard

generation: Add 30upload-image.sh

parent 5459a58c
#!/bin/bash
set -e
# get the root of the git repository (requires git to be installed)
GIT_ROOT=`git rev-parse --show-toplevel`
cd $GIT_ROOT
# define useful variables
source generation/00env.sh
uefi_image_name="$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -r)_${MCA_NAME_AND_VERSION}_${FLB_NAME_AND_VERSION}_${SERVER_GROUP}_${TARGET_HOSTNAME}".efi
networkcache-upload --conf ../test.cfg --file "$uefi_image_name"
sha_list=installation/images-sha512.list
hash_comment="# dhcp rd.neednet=1 no scanning no sending (test again as the previous scanned and sent)"
echo $(sha512sum "$uefi_image_name" | cut -d' ' -f1) "$hash_comment" >> "$sha_list"
git add "$sha_list"
git commit -m "installation: Add an image hash."
git push
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