mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Merge branch 'patch-2' of git://github.com/wmertens/nix
install-nix-from-closure improvments
This commit is contained in:
commit
1b3e704fb9
1 changed files with 9 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
#! /usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -49,7 +49,10 @@ for i in $(cd $self/store >/dev/null && echo *); do
|
||||||
fi
|
fi
|
||||||
if ! [ -e "$dest/store/$i" ]; then
|
if ! [ -e "$dest/store/$i" ]; then
|
||||||
cp -Rp "$self/store/$i" "$i_tmp"
|
cp -Rp "$self/store/$i" "$i_tmp"
|
||||||
|
chmod -R a-w "$i_tmp"
|
||||||
|
chmod +w "$i_tmp"
|
||||||
mv "$i_tmp" "$dest/store/$i"
|
mv "$i_tmp" "$dest/store/$i"
|
||||||
|
chmod -w "$dest/store/$i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "" >&2
|
echo "" >&2
|
||||||
|
@ -65,6 +68,11 @@ if ! $nix/bin/nix-store --load-db < $self/.reginfo; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! $nix/bin/nix-store --verify; then
|
||||||
|
echo "$0: store verification failed! Consider deleting /nix and starting over" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
. $nix/etc/profile.d/nix.sh
|
. $nix/etc/profile.d/nix.sh
|
||||||
|
|
||||||
if ! $nix/bin/nix-env -i "$nix"; then
|
if ! $nix/bin/nix-env -i "$nix"; then
|
||||||
|
|
Loading…
Reference in a new issue