k 4 infest: prepare Regression for stockholm

This commit is contained in:
makefu 2017-06-26 14:22:11 +02:00
parent 1f72a5d66b
commit d58e8035b4
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -36,14 +36,7 @@ prepare() {(
;; ;;
esac esac
;; ;;
nixos) nixos|stockholm)
case $(cat /proc/cmdline) in
*' root=LABEL=NIXOS_ISO '*)
prepare_nixos_iso "$@"
exit
esac
;;
stockholm)
case $(cat /proc/cmdline) in case $(cat /proc/cmdline) in
*' root=LABEL=NIXOS_ISO '*) *' root=LABEL=NIXOS_ISO '*)
prepare_nixos_iso "$@" prepare_nixos_iso "$@"
@ -102,7 +95,8 @@ prepare_nixos_iso() {
mkdir -p bin mkdir -p bin
rm -f bin/nixos-install rm -f bin/nixos-install
cp "$(type -p nixos-install)" bin/nixos-install cp "$(type -p nixos-install)" bin/nixos-install
sed -i "s@^NIX_PATH=\"[^\"]*\"@NIX_PATH=$target_path@" bin/nixos-install sed -i 's@^\(\(export \|\)NIX_PATH\)=\"[^\"]*\"@\1=$target_path@' bin/nixos-install
} }
get_nixos_install() { get_nixos_install() {
@ -217,7 +211,7 @@ prepare_common() {(
mkdir -p bin mkdir -p bin
rm -f bin/nixos-install rm -f bin/nixos-install
cp "$(type -p nixos-install)" bin/nixos-install cp "$(type -p nixos-install)" bin/nixos-install
sed -i "s@^NIX_PATH=\"[^\"]*\"@NIX_PATH=$target_path@" bin/nixos-install sed -i 's@^\(\(export \|\)NIX_PATH\)=\"[^\"]*\"@\1=$target_path@' bin/nixos-install
if ! grep -q '^PATH.*#krebs' .bashrc; then if ! grep -q '^PATH.*#krebs' .bashrc; then
echo '. /root/.nix-profile/etc/profile.d/nix.sh' >> .bashrc echo '. /root/.nix-profile/etc/profile.d/nix.sh' >> .bashrc