<commit_before>#! /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 @kernelpkgs@).everything' | @nix@/bin/nix-instantiate -)))

kernel=$(@nix@/bin/nix-store -r $(echo '(import @kernelpkgs@).kernel' | @nix@/bin/nix-instantiate -))

ov511=$(@nix@/bin/nix-store -r $(echo '(import @kernelpkgs@).ov511' | @nix@/bin/nix-instantiate -))

module_init_tools=$(@nix@/bin/nix-store -r $(echo '(import @kernelpkgs@).module_init_tools' | @nix@/bin/nix-instantiate -))

#echo making kernel stuff

kernelVersion=$(cd $kernel/lib/modules/; @coreutils@/bin/ls -d *)

echo removing old kernel tree

@coreutils@/bin/rm -rf $archivesDir/lib/modules/$kernelVersion

echo making new kernel tree

@coreutils@/bin/mkdir -p $archivesDir/lib/modules/$kernelVersion

#echo $kernelVersion

cd $kernel

echo making kernel directories

@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type d | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/mkdir -p $archivesDir/%

echo linking kernel modules

@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" \
  -a -not -path "./System*" -a -not -path "./vmlinuz*" \
 -type f | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/ln -s $kernel/% $archivesDir/%

echo making ov511 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/%

echo linking ov511 modules

@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type f | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/ln -s $ov511/% $archivesDir/%

echo running depmod

@module_init_tools@/sbin/depmod -ae<commit_msg>cleanups<commit_after>#! /bin/sh -e

archivesDir=/

kernel=$(@nix@/bin/nix-store -r $(echo '(import @kernelpkgs@).kernel' | @nix@/bin/nix-instantiate -))

ov511=$(@nix@/bin/nix-store -r $(echo '(import @kernelpkgs@).ov511' | @nix@/bin/nix-instantiate -))

module_init_tools=$(@nix@/bin/nix-store -r $(echo '(import @kernelpkgs@).module_init_tools' | @nix@/bin/nix-instantiate -))

kernelVersion=$(cd $kernel/lib/modules/; @coreutils@/bin/ls -d *)

echo removing old kernel tree

@coreutils@/bin/rm -rf $archivesDir/lib/modules/$kernelVersion

echo making new kernel tree

@coreutils@/bin/mkdir -p $archivesDir/lib/modules/$kernelVersion

cd $kernel

echo making kernel directories

@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type d | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/mkdir -p $archivesDir/%

echo symlinking kernel modules

@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" \
  -a -not -path "./System*" -a -not -path "./vmlinuz*" \
 -type f | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/ln -s $kernel/% $archivesDir/%

echo making ov511 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/%

echo symlinking ov511 modules

@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type f | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/ln -s $ov511/% $archivesDir/%

echo running depmod

@module_init_tools@/sbin/depmod -ae
{'fraction_non_alphanumeric': 0.19106549954723814, 'fraction_numerical': 0.013281014186537881, 'mean_word_length': 4.006042296072508, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7483295', 'n_tokens_mistral': 1330, 'n_tokens_neox': 1241, 'n_words': 274}