linux-live/tools/isolinux.bin.update

39 lines
685 B
Bash
Executable File

#!/bin/bash
# This script will update the file ../bootfiles/isolinux.bin to match
# your LiveKit name
#
# Requires: Debian
#
set -e
CWD=$(pwd)
echo
echo "--------------------------------------"
echo "Add directory to isolinux search paths"
echo -n "(for example /slax/boot): "
read DIR
# download, unpack, and patch syslinux
apt-get build-dep syslinux
mkdir -m 0777 /tmp/syslinux
cd /tmp/syslinux
apt-get source syslinux
cd syslinux*/core
for file in fs/iso9660/iso9660.c fs/lib/loadconfig.c elflink/load_env32.c; do
sed -i -r 's:"/",:"'$DIR'",\n\t"/",:' $file
done
cd ../
make -j 8
echo
echo "Copying isolinux.bin to $CWD"
cp -p bios/core/isolinux.bin $CWD/isolinux.bin