1
0
mirror of https://github.com/rancher/os.git synced 2025-06-20 12:11:56 +00:00
os/scripts/build
2018-08-06 15:19:29 +08:00

23 lines
519 B
Bash
Executable File

#!/bin/bash
set -e
version_gt() {
test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1";
}
if [ "$KERNEL_CHECK" != "0" ]; then
echo "Host Kernel: $(uname -r)"
echo "RancherOS Kernel: $KERNEL_VERSION"
if ! version_gt $(uname -r) $KERNEL_VERSION; then
echo "Your host kernel must be greater than RancherOS KERNEL_VERSION"
exit 1
fi
fi
echo -------------------------./build-target
$(dirname $0)/build-target
echo -------------------------./build-host
$(dirname $0)/build-host