write script to generate outdir from filelist

Signed-off-by: Nico Schottelius <nico@wurzel.schottelius.org>
This commit is contained in:
Nico Schottelius 2015-05-13 08:13:54 +02:00
parent 9f3a8c0956
commit 75e3f3c90f
5 changed files with 60 additions and 0 deletions

23
hacking/copy_files_for_iso.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
set -ex
testdir=./iso-root-dir
# Create base
rm -rf "$testdir"
mkdir "$testdir"
# Copy binaries
# Copy kernel
mkdir -p "$testdir/boot"
cp /boot/vmlinuz-linux "$testdir/boot/kernel"
cp /boot/initramfs-linux-fallback.img "$testdir/boot/initramfs"
# Create iso
genisoimage -v -V "cdist preos v0.1" \
-cache-inodes -J -l \
-r -no-emul-boot \
-boot-load-size 4 -b isolinux.bin -c boot.cat -o cdist-preos.iso iso

View File

@ -0,0 +1,7 @@
#!/bin/sh
# Generate filelist excluding stuff that takes only space
for pkg in bash systemd util-linux; do
pacman -Qlq $pkg | grep -v \
-e /usr/share/man/
done

18
hacking/filelist_to_dir.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "$0 outdir"
exit 1
fi
outdir=$1; shift
mkdir -p "$outdir"
while read file; do
if [ -d "$file" ]; then
mkdir -p "$outdir$file"
else
cp --preserve=mode,links "$file" "$outdir$file"
fi
done

12
hacking/qemu-test.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "$0 iso"
exit 1
fi
iso=$1; shift
qemu-system-x86_64 -m 512 -boot order=cd \
-drive=$iso,media=cdrom

0
hacking/recursive-ldd.sh Normal file → Executable file
View File