mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-08-16 20:00:36 +03:00
check target OS
This commit is contained in:
parent
ab86ca7927
commit
28809e0ef9
@ -77,6 +77,11 @@ if [ ${is_kexec-n} != "y" ]; then
|
||||
# TODO we probably need an architecture detection here
|
||||
ssh_ << SSH
|
||||
set -efux
|
||||
os=\$(uname)
|
||||
if [[ "\$os" != "Linux" ]]; then
|
||||
echo "This script requires Linux as the operating system, but got \${os}" >&2
|
||||
exit 1
|
||||
fi
|
||||
fetch(){
|
||||
if command -v curl >/dev/null 2>&1; then
|
||||
curl --fail -Ss -L "\$1"
|
||||
|
Loading…
Reference in New Issue
Block a user