make all paths absolute...still needed: a builder
svn path=/nixu/trunk/; revision=4563
This commit is contained in:
parent
bb22789021
commit
994b85b4af
@ -1,49 +0,0 @@
|
|||||||
#! /bin/sh -e
|
|
||||||
|
|
||||||
archivesDir=$(mktemp -d)
|
|
||||||
manifest=${archivesDir}/MANIFEST
|
|
||||||
nixpkgs=/nixpkgs/trunk/pkgs
|
|
||||||
fill_disk=$archivesDir/scripts/fill-disk.sh
|
|
||||||
ramdisk_login=$archivesDir/scripts/ramdisk-login.sh
|
|
||||||
storePaths=$archivesDir/mystorepaths
|
|
||||||
validatePaths=$archivesDir/validatepaths
|
|
||||||
bootiso=/tmp/nixos.iso
|
|
||||||
initrd=/tmp/initram.img
|
|
||||||
initdir=${archivesDir}/initdir
|
|
||||||
initscript=$archivesDir/scripts/init.sh
|
|
||||||
|
|
||||||
NIX_CMD_PATH=$(dirname $(which nix-store))
|
|
||||||
cpwd=`pwd`
|
|
||||||
|
|
||||||
storeExpr=$($NIX_CMD_PATH/nix-store -qR $($NIX_CMD_PATH/nix-store -r $(echo '(import ./kernel.nix).everything' | $NIX_CMD_PATH/nix-instantiate -)))
|
|
||||||
|
|
||||||
kernel=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./kernel.nix).kernel' | $NIX_CMD_PATH/nix-instantiate -))
|
|
||||||
|
|
||||||
ov511=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./kernel.nix).ov511' | $NIX_CMD_PATH/nix-instantiate -))
|
|
||||||
|
|
||||||
echo $kernel
|
|
||||||
echo $ov511
|
|
||||||
|
|
||||||
echo making kernel stuff
|
|
||||||
|
|
||||||
kernelVersion=$(cd $kernel/lib/modules/; ls -d *)
|
|
||||||
mkdir -p $archivesDir/lib/modules/$kernelVersion
|
|
||||||
|
|
||||||
echo $kernelVersion
|
|
||||||
|
|
||||||
cd $kernel
|
|
||||||
|
|
||||||
# make directories
|
|
||||||
|
|
||||||
find . -not -path "./lib/modules/$kernelVersion/build*" -type d | xargs -n 1 -i% mkdir -p $archivesDir/%
|
|
||||||
|
|
||||||
# link all files
|
|
||||||
find . -not -path "./lib/modules/$kernelVersion/build*" -type f | xargs -n 1 -i% ln -s $kernel/% $archivesDir/%
|
|
||||||
|
|
||||||
# make directories
|
|
||||||
|
|
||||||
cd $ov511
|
|
||||||
find . -not -path "./lib/modules/$kernelVersion/build*" -type d | xargs -n 1 -i% mkdir -p $archivesDir/%
|
|
||||||
|
|
||||||
# link all files
|
|
||||||
find . -not -path "./lib/modules/$kernelVersion/build*" -type f | xargs -n 1 -i% ln -s $ov511/% $archivesDir/%
|
|
36
kernelscripts/make-kernel.sh.in
Executable file
36
kernelscripts/make-kernel.sh.in
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
#! /bin/sh -e
|
||||||
|
|
||||||
|
#archivesDir=$(@mktemp@/bin/mktemp -d)
|
||||||
|
archivesDir=/
|
||||||
|
|
||||||
|
cpwd=@coreutils@/bin/pwd
|
||||||
|
|
||||||
|
storeExpr=$(@nix@/bin/nix-store -qR $(@nix@/bin/nix-store -r $(echo '(import ./kernel.nix).everything' | @nix@/bin/nix-instantiate -)))
|
||||||
|
|
||||||
|
kernel=$(@nix@/bin/nix-store -r $(echo '(import ./kernel.nix).kernel' | @nix@/bin/nix-instantiate -))
|
||||||
|
|
||||||
|
ov511=$(@nix@/bin/nix-store -r $(echo '(import ./kernel.nix).ov511' | @nix@/bin/nix-instantiate -))
|
||||||
|
|
||||||
|
#echo making kernel stuff
|
||||||
|
|
||||||
|
kernelVersion=$(cd $kernel/lib/modules/; @coreutils@/bin/ls -d *)
|
||||||
|
@coreutils@/bin/mkdir -p $archivesDir/lib/modules/$kernelVersion
|
||||||
|
|
||||||
|
#echo $kernelVersion
|
||||||
|
|
||||||
|
cd $kernel
|
||||||
|
|
||||||
|
# make directories
|
||||||
|
|
||||||
|
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type d | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/mkdir -p $archivesDir/%
|
||||||
|
|
||||||
|
# link all files
|
||||||
|
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type f | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/ln -s $kernel/% $archivesDir/%
|
||||||
|
|
||||||
|
# make directories
|
||||||
|
|
||||||
|
cd $ov511
|
||||||
|
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type d | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/mkdir -p $archivesDir/%
|
||||||
|
|
||||||
|
# link all files
|
||||||
|
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type f | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/ln -s $ov511/% $archivesDir/%
|
Loading…
Reference in New Issue
Block a user