download compiled guest_api instead of building

This commit is contained in:
ghe0 2024-11-12 17:11:07 +02:00
parent 8c8a60e821
commit fa1591aad8
Signed by: ghe0
GPG Key ID: 451028EE56A0FBB4
2 changed files with 6 additions and 13 deletions

@ -5,3 +5,4 @@ script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
export ROOT="${script_dir}/build/initrd_root" export ROOT="${script_dir}/build/initrd_root"
export BUSYBOX_PATH="/usr/lib/initcpio/busybox" export BUSYBOX_PATH="/usr/lib/initcpio/busybox"
export KERNEL="$(uname -r)" export KERNEL="$(uname -r)"
export GUEST_API_URL="https://gitea.detee.cloud/ghe0/stuff/releases/download/v0.0.0/guest_api.zst"

@ -149,19 +149,11 @@ scan_modules() {
} }
install_guest_api() { install_guest_api() {
my_location="$(pwd)" wget -O guest_api.zst "$GUEST_API_URL" 2> /dev/null
echo_blue "Building guest_api with cargo and saving log to ${my_location}/guest_api.log" zstd --decompress guest_api.zst
git clone git@gitea.detee.cloud:SNP/remote_decryption.git chmod +x guest_api
cd remote_decryption/guest_api install_binary "$(pwd)/guest_api"
# TODO: stick to master branch after code stabilizes rm guest_api guest_api.zst
git checkout dtrfs
git pull
# TODO: download the binary from the detee registry
cargo build --release > "${my_location}/guest_api.log" 2>&1 ||
echo_red "Failed to build guest_api"
strip --discard-all target/release/guest_api
install_binary "$(pwd)/target/release/guest_api"
cd $my_location
} }
create_archive() { create_archive() {