"make release" draft

This commit is contained in:
2026-03-22 23:47:55 +08:00
parent a9a3af5e99
commit e324969a94
10 changed files with 104 additions and 23 deletions

21
alpine/sync-loop.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
DEVICE="$1"
FAKE_DEV="/tmp/dev"
mkdir -p "$FAKE_DEV"
echo "Refreshing partition table..."
partx -u "$DEVICE" 2>/dev/null || partx -a "$DEVICE"
# Find partitions and their Major:Minor numbers
lsblk -rn -o NAME,MAJ:MIN "$DEVICE" | while read -r NAME MAJMIN; do
# Skip the parent loop0
if [[ "$NAME" == "loop0" ]]; then continue; fi
PART_PATH="$FAKE_DEV/$NAME"
MAJOR=$(echo $MAJMIN | cut -d: -f1)
MINOR=$(echo $MAJMIN | cut -d: -f2)
echo "Creating node: $PART_PATH (b $MAJOR $MINOR)"
mknod "$PART_PATH" b "$MAJOR" "$MINOR"
done