#!/bin/bash set -e script_dir=$(dirname "$0") cd "$script_dir/.." prerequisites=$1 if [ "$prerequisites" == "--prep" ]; then echo "Preparing the packager environment" apt update && apt install -y openssh-client rustup install 1.83.0 rustup install stable-x86_64-unknown-linux-gnu rustup default stable rustup target add x86_64-unknown-linux-musl echo "Building the occlum fork" [ -d occlum ] || git clone https://gitea.detee.cloud/general/occlum.git (cd occlum && make submodule) (cd occlum/tools/toolchains/utils_lib && ./build.sh) fi echo "Building the hacker-challenge signed bundle" occlum-cargo build --release strip target/x86_64-unknown-linux-musl/release/hacker-challenge cat > challenge.yaml <