download compiled guest_api instead of building
This commit is contained in:
		
							parent
							
								
									8c8a60e821
								
							
						
					
					
						commit
						fa1591aad8
					
				| @ -5,3 +5,4 @@ script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||||
| export ROOT="${script_dir}/build/initrd_root" | ||||
| export BUSYBOX_PATH="/usr/lib/initcpio/busybox" | ||||
| 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() { | ||||
|   my_location="$(pwd)" | ||||
|   echo_blue "Building guest_api with cargo and saving log to ${my_location}/guest_api.log" | ||||
|   git clone git@gitea.detee.cloud:SNP/remote_decryption.git | ||||
|   cd remote_decryption/guest_api | ||||
|   # TODO: stick to master branch after code stabilizes | ||||
|   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 | ||||
|   wget -O guest_api.zst "$GUEST_API_URL" 2> /dev/null | ||||
|   zstd --decompress guest_api.zst | ||||
|   chmod +x guest_api | ||||
|   install_binary "$(pwd)/guest_api" | ||||
|   rm guest_api guest_api.zst | ||||
| } | ||||
| 
 | ||||
| create_archive() { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user