mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 13:11:31 +00:00
controller: implement enhanced image name format support
This commit is contained in:
29
scripts/krata-debug-common.sh
Normal file
29
scripts/krata-debug-common.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
REAL_SCRIPT="$(realpath "${0}")"
|
||||
cd "$(dirname "${REAL_SCRIPT}")/.."
|
||||
|
||||
if [ -z "${RUST_LOG}" ]
|
||||
then
|
||||
RUST_LOG="INFO"
|
||||
fi
|
||||
|
||||
CARGO_BUILD_FLAGS=""
|
||||
|
||||
if [ "${KRATA_BUILD_QUIET}" = "1" ]
|
||||
then
|
||||
CARGO_BUILD_FLAGS="-q"
|
||||
fi
|
||||
|
||||
build_and_run() {
|
||||
EXE_TARGET="${1}"
|
||||
shift
|
||||
if [ "${KRATA_BUILD_INITRD}" = "1" ]
|
||||
then
|
||||
./initrd/build.sh -q
|
||||
sudo cp "target/initrd/initrd" "/var/lib/krata/default/initrd"
|
||||
fi
|
||||
cargo build ${CARGO_BUILD_FLAGS} --target x86_64-unknown-linux-gnu --bin "${EXE_TARGET}"
|
||||
exec sudo RUST_LOG="${RUST_LOG}" "target/x86_64-unknown-linux-gnu/debug/${EXE_TARGET}" "${@}"
|
||||
}
|
@ -1,14 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ -z "${RUST_LOG}" ]
|
||||
then
|
||||
RUST_LOG="INFO"
|
||||
fi
|
||||
|
||||
REAL_SCRIPT="$(realpath "${0}")"
|
||||
cd "$(dirname "${REAL_SCRIPT}")/.."
|
||||
./initrd/build.sh -q
|
||||
sudo cp "target/initrd/initrd" "/var/lib/krata/default/initrd"
|
||||
cargo build --target x86_64-unknown-linux-gnu --bin kratactl
|
||||
exec sudo RUST_LOG="${RUST_LOG}" target/x86_64-unknown-linux-gnu/debug/kratactl "${@}"
|
||||
# shellcheck source-path=krata-debug-common.sh
|
||||
. "$(dirname "${REAL_SCRIPT}")/krata-debug-common.sh"
|
||||
|
||||
KRATA_BUILD_INITRD=1 build_and_run kratactl "${@}"
|
||||
|
@ -1,12 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ -z "${RUST_LOG}" ]
|
||||
then
|
||||
RUST_LOG="INFO"
|
||||
fi
|
||||
|
||||
REAL_SCRIPT="$(realpath "${0}")"
|
||||
cd "$(dirname "${REAL_SCRIPT}")/.."
|
||||
cargo build --target x86_64-unknown-linux-gnu --bin kratanet
|
||||
exec sudo RUST_LOG="${RUST_LOG}" target/x86_64-unknown-linux-gnu/debug/kratanet "${@}"
|
||||
# shellcheck source-path=krata-debug-common.sh
|
||||
. "$(dirname "${REAL_SCRIPT}")/krata-debug-common.sh"
|
||||
|
||||
build_and_run kratanet "${@}"
|
||||
|
Reference in New Issue
Block a user