chore: initialize Calculet NPU research archive

This commit is contained in:
2026-08-02 14:50:15 +08:00
commit b5c4fbffab
6 changed files with 153 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/bin/sh
set -eu
repo_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
output_dir=${1:-"$repo_root/reassembled"}
mkdir -p "$output_dir"
find "$repo_root/archives" -mindepth 1 -maxdepth 1 -type d -name '*.parts' -print | sort |
while IFS= read -r parts_dir; do
archive_name=$(basename "$parts_dir" .parts)
destination="$output_dir/$archive_name"
echo "Reassembling $archive_name"
find "$parts_dir" -type f -name 'part-*' -print | sort | xargs cat > "$destination"
done
for archive in "$repo_root"/archives/*; do
if [ -f "$archive" ]; then
archive_name=$(basename "$archive")
[ -e "$output_dir/$archive_name" ] || ln -s "$archive" "$output_dir/$archive_name"
fi
done
(cd "$output_dir" && shasum -a 256 -c "$repo_root/checksums/main-archives.sha256")