mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-10-26 16:30:39 +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
|
# TODO we probably need an architecture detection here
|
||||||
ssh_ << SSH
|
ssh_ << SSH
|
||||||
set -efux
|
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(){
|
fetch(){
|
||||||
if command -v curl >/dev/null 2>&1; then
|
if command -v curl >/dev/null 2>&1; then
|
||||||
curl --fail -Ss -L "\$1"
|
curl --fail -Ss -L "\$1"
|
||||||
|
Loading…
Reference in New Issue
Block a user