2007-02-22 23:46:50 +01:00
|
|
|
# Created by Tobias Powalowski <tpowa@archlinux.org>
|
|
|
|
|
|
|
|
install ()
|
|
|
|
{
|
|
|
|
### check for activated testing repository
|
|
|
|
if ! [ "$(grep '^\[testing\]' /etc/pacman.conf)" = "" ]; then
|
|
|
|
echo "WARNING: TESTING REPOSITORY ACTIVATED"
|
|
|
|
echo "-------------------------------------"
|
|
|
|
echo "POSSIBILITY OF BROKEN BINARY PACKAGES ON INSTALL MEDIA!"
|
|
|
|
echo "Use a chroot instead to avoid those problems."
|
|
|
|
echo "5 seconds time to cancel with CTRL+C"
|
|
|
|
sleep 5
|
|
|
|
fi
|
|
|
|
### begin cvs part
|
|
|
|
if ! [ "${LOCALSETUP}" = "yes" ]; then
|
2007-10-22 07:56:38 +02:00
|
|
|
CVSTREE=$(mktemp /tmp/corecvs.XXXX)
|
2007-11-19 18:38:05 +01:00
|
|
|
GIT_INSTALLER_TREE=$(mktemp /tmp/installer.git.XXXX)
|
2007-02-22 23:46:50 +01:00
|
|
|
rm ${CVSTREE}
|
2007-11-19 18:38:05 +01:00
|
|
|
rm ${GIT_INSTALLER_TREE}
|
2007-02-22 23:46:50 +01:00
|
|
|
mkdir -p ${CVSTREE}
|
2007-11-19 18:38:05 +01:00
|
|
|
mkdir -p ${GIT_INSTALLER_TREE}
|
2007-02-22 23:46:50 +01:00
|
|
|
else
|
|
|
|
CVSTREE=${CVSTREE}
|
2007-11-19 18:38:05 +01:00
|
|
|
GIT_INSTALLER_TREE=${GIT_INSTALLER_TREE}
|
2007-02-22 23:46:50 +01:00
|
|
|
fi
|
|
|
|
SCRIPT=
|
|
|
|
BINARIES=
|
|
|
|
# always needed for every install
|
2007-11-19 18:38:05 +01:00
|
|
|
cd ${GIT_INSTALLER_TREE}
|
2007-02-22 23:46:50 +01:00
|
|
|
if ! [ "${LOCALSETUP}" = "yes" ]; then
|
2007-11-19 18:38:05 +01:00
|
|
|
git-clone ${GIT_INSTALLER}
|
2007-02-22 23:46:50 +01:00
|
|
|
fi
|
|
|
|
# fix km script
|
|
|
|
KM=$(mktemp /tmp/km.XXXX)
|
|
|
|
if ! [ "${LOCALSETUP}" = "yes" ]; then
|
2007-11-20 12:27:09 +01:00
|
|
|
cp -f /etc/archboot/scripts/km ${KM}
|
2007-02-22 23:46:50 +01:00
|
|
|
else
|
|
|
|
cp -f ${KMSCRIPT} ${KM}
|
|
|
|
fi
|
|
|
|
sed -i -e 's#$BASEDIR/keymaps/##g' ${KM}
|
|
|
|
chmod 755 ${KM}
|
|
|
|
mkdir -p ${TEMPDIR}/arch
|
|
|
|
add_file "${KM}" "/bin/km"
|
|
|
|
# fix mirrors.txt
|
2007-10-22 08:26:34 +02:00
|
|
|
if ! [ "${LOCALSETUP}" = "yes" ]; then
|
2007-11-19 18:38:05 +01:00
|
|
|
sed -i -e "s/i686/$(uname -m)/g" ${GIT_INSTALLER_TREE}/installer/mirrors.txt
|
|
|
|
add_file "${GIT_INSTALLER_TREE}/installer/setup" "/arch/setup"
|
|
|
|
add_file "${GIT_INSTALLER_TREE}/installer/quickinst" "/arch/quickinst"
|
|
|
|
add_file "${GIT_INSTALLER_TREE}/installer/mirrors.txt" "/arch/mirrors.txt"
|
2007-02-22 23:46:50 +01:00
|
|
|
else
|
2007-10-22 08:26:34 +02:00
|
|
|
MIRRORTREE=$(mktemp /tmp/mirror.XXXX)
|
|
|
|
rm ${MIRRORTREE}
|
|
|
|
mkdir -p ${MIRRORTREE}
|
2007-11-19 18:38:05 +01:00
|
|
|
cp ${GIT_INSTALLER_TREE}/mirrors.txt ${MIRRORTREE}/
|
2007-10-22 08:26:34 +02:00
|
|
|
sed -i -e "s/i686/$(uname -m)/g" ${MIRRORTREE}/mirrors.txt
|
2007-02-22 23:46:50 +01:00
|
|
|
add_file "${SETUP}" "/arch/setup"
|
|
|
|
add_file "${QUICKINST}" "/arch/quickinst"
|
2007-10-22 08:26:34 +02:00
|
|
|
add_file "${MIRRORTREE}/mirrors.txt" "/arch/mirrors.txt"
|
2007-02-22 23:46:50 +01:00
|
|
|
fi
|
|
|
|
DOCS=$(mktemp /tmp/docs.XXXX)
|
|
|
|
if ! [ "${LOCALSETUP}" = "yes" ]; then
|
2007-11-20 12:27:09 +01:00
|
|
|
cp -f ${GIT_INSTALLER_TREE}/installer/arch-install-guide.txt ${DOCS}
|
2007-02-22 23:46:50 +01:00
|
|
|
else
|
|
|
|
cp -f ${DOCUMENTATION} ${DOCS}
|
|
|
|
fi
|
|
|
|
gzip -9 ${DOCS}
|
|
|
|
add_file "${DOCS}.gz" "/arch/archdoc.txt.gz"
|
|
|
|
add_dir "/src"
|
|
|
|
if ! [ "${LOCALSETUP}" = "yes" ]; then
|
2007-11-20 12:27:09 +01:00
|
|
|
! [ "${TEMPDIR}" = "" ] && cp ${GIT_INSTALLER_TREE}/installer/arch-install-guide.txt ${TEMPDIR}/arch/archdoc.txt
|
2007-02-22 23:46:50 +01:00
|
|
|
else
|
|
|
|
! [ "${TEMPDIR}" = "" ] && cp -f ${DOCUMENTATION} ${TEMPDIR}/arch/archdoc.txt
|
|
|
|
fi
|
|
|
|
# generate iso title name
|
|
|
|
[ "${RUNPROGRAM}" = "mkbootcd" -o "${RUNPROGRAM}" = "mkbootcd-grub" ] && echo "Arch Linux FTP $(uname -m)" >> ${ISONAME}
|
|
|
|
}
|
|
|
|
|
|
|
|
help ()
|
|
|
|
{
|
|
|
|
cat <<HELPEOF
|
|
|
|
This hook sets up all you need for a arch ftp install image.
|
|
|
|
HELPEOF
|
|
|
|
}
|