From 08ad51690d8d4380aad198f6a08f2f695cec2151 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 6 Feb 2007 13:09:25 +0000 Subject: [PATCH] * Merge the test and upgrade scripts into a program "nixos-rebuild" which is included in the system path. svn path=/nixos/trunk/; revision=7853 --- installer/nixos-install.nix | 2 +- installer/nixos-rebuild.nix | 9 +++++++ installer/nixos-rebuild.sh | 49 +++++++++++++++++++++++++++++++++++++ system/system.nix | 8 +++++- test.sh | 9 ------- upgrade.sh | 9 ------- 6 files changed, 66 insertions(+), 20 deletions(-) create mode 100644 installer/nixos-rebuild.nix create mode 100644 installer/nixos-rebuild.sh delete mode 100755 test.sh delete mode 100755 upgrade.sh diff --git a/installer/nixos-install.nix b/installer/nixos-install.nix index 8e3eff4d947..298bf594c44 100644 --- a/installer/nixos-install.nix +++ b/installer/nixos-install.nix @@ -1,4 +1,4 @@ -{ stdenv, perl, runCommand, substituteAll, nix +{ perl, runCommand, substituteAll, nix , # URL of the Nixpkgs distribution that the installer will pull. # Leave empty for a pure source distribution. nixpkgsURL ? "" diff --git a/installer/nixos-rebuild.nix b/installer/nixos-rebuild.nix new file mode 100644 index 00000000000..52cc939eabf --- /dev/null +++ b/installer/nixos-rebuild.nix @@ -0,0 +1,9 @@ +{substituteAll, nix}: + +substituteAll { + name = "nixos-rebuild"; + src = ./nixos-rebuild.sh; + dir = "bin"; + isExecutable = true; + inherit nix; +} diff --git a/installer/nixos-rebuild.sh b/installer/nixos-rebuild.sh new file mode 100644 index 00000000000..12404f8d4af --- /dev/null +++ b/installer/nixos-rebuild.sh @@ -0,0 +1,49 @@ +#! @shell@ -e + + +# What are we supposed to do? +action="$1" + +if test -z "$action"; then + # !!! more or less cut&paste from + # system/switch-to-configuration.sh (which we call, of course). + cat <