From e522ff5f15dd8b5878b65be3b42173f6cb85df4c Mon Sep 17 00:00:00 2001 From: Diederik de Haas Date: Sun, 6 Nov 2022 19:19:52 +0100 Subject: [PATCH] Remove unused/empty files The `compress.sh` file hasn't been used for a long time. The `.gitmodules` file was emptied as it wasn't used any more. Just get rid of both of them. --- .gitmodules | 0 compress.sh | 34 ---------------------------------- 2 files changed, 34 deletions(-) delete mode 100644 .gitmodules delete mode 100755 compress.sh diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29..0000000 diff --git a/compress.sh b/compress.sh deleted file mode 100755 index 368eb1b..0000000 --- a/compress.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# Copies raspi3.img into compr.img, resulting in many consecutive zero bytes -# which are nicely compressible. - -set -e - -qemu-img create -f raw compr.img 1100M - -# copy partition table from raspi3.img -sfdisk --quiet --dump raspi3.img | sfdisk --quiet compr.img - -readarray rmappings < <(sudo kpartx -asv raspi3.img) -readarray cmappings < <(sudo kpartx -asv compr.img) - -# copy the vfat boot partition as-is -set -- ${rmappings[0]} -rboot="$3" -set -- ${cmappings[0]} -cboot="$3" -sudo dd if=/dev/mapper/${rboot?} of=/dev/mapper/${cboot?} bs=5M status=none - -# copy the ext4 root partition in a space-saving way -set -- ${rmappings[1]} -rroot="$3" -set -- ${cmappings[1]} -croot="$3" -sudo e2fsck -y -f /dev/mapper/${rroot?} -sudo resize2fs /dev/mapper/${rroot?} 800M -sudo e2image -rap /dev/mapper/${rroot?} /dev/mapper/${croot?} - -sudo kpartx -ds raspi3.img -sudo kpartx -ds compr.img - -xz -8 -f compr.img