Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: b47059b73f
Fetching contributors…

Cannot retrieve contributors at this time

executable file 76 lines (61 sloc) 1.951 kB
#/bin/sh
set -e
# NO, this cannot be changed to "unstable", or you won't be able to find
# packages in the last step of ISO creation.
CODENAME=sid
usage () { echo "usage: `basename $0` [ -f ] iso kernver zfsver dideb" ; return 0; }
usageerr () { usage >&2 ; return 1 ; }
if [ $# -lt 3 ] ; then
usageerr
else
[ $# -lt 6 ] || usageerr
# FIXME accept -f among last params!
if [ $# -eq 5 ] ; then
if [ "$1" = "-f" ] ; then
shift
else
usageerr
fi
echo -n "Cleaning up old files..."
rm -rf images tmp
echo
elif [ "$1" = "-f" ] ; then
echo "Not allowing ISO name of -f" >&2
usageerr
fi
fi
ISO="$1"
KPKGS="$2"
ZFSVER="$3"
DI="$4"
if [ "`readlink -e \`dirname $ISO\``" = "`readlink -e images`" ] ; then
echo "Warning; won't place output in images/." >&2
usageerr
fi
#KPKGS="$KPKGS,`pwd`/unstable/linux-image-$KVER-amd64-dbg_$KVER""_amd64.deb"
PKGS="$DI,`pwd`/unstable/s-i/installer/build/localudebs,`pwd`/unstable/spl_$ZFSVER.deb,`pwd`/unstable/zfs_$ZFSVER.deb"
PKGS="$PKGS,`ls \`pwd\`/unstable/*.deb | tr [[:space:]] ,`"
PKGS="$PKGS,`pwd`/unstable/var/cache/apt/archives/libfreetype6_2.4.10-1_amd64.deb"
PKGS="$PKGS,$KPKGS"
for i in `echo $KPKGS | tr , \ ` ; do
[ -r "$i" ] || { echo "Kernel package $i didn't exist." >&2 ; exit 1; }
done
for i in `echo $PKGS | tr , \ ` ; do
[ -r "$i" ] || { echo "Package $i didn't exist." >&2 ; exit 1; }
done
[ -r "$DI" ] || { echo "S-I package $DI didn't exist." >&2 ; exit 1; }
mkdir -p tmp/mirror/dists/"$CODENAME"/main/installer-amd64/current/images/
cp -r dest/* tmp/mirror/dists/"$CODENAME"/main/installer-amd64/current/images/
simple-cdd --dist "$CODENAME" --profiles SprezzOS -b SprezzOS --auto-profiles SprezzOS \
--local-packages "$PKGS" --kernel-packages "$KPKGS"
cleancd () {
fusermount -u "$tmp"
rmdir "$tmp"
chmod -R +w "$tmp2"
rm -rf "$tmp2"
}
tmp="`mktemp -d`"
tmp2="`mktemp -d`"
./grubify "$ISO" "$tmp" "$tmp2" || { cleancd ; exit 1 ; }
cleancd
exit 0
Jump to Line
Something went wrong with that request. Please try again.