2021-04-28 17:21:39 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# https://wiki.archlinux.org/index.php/Archiso#Prepare_a_custom_profile
|
|
|
|
#
|
|
|
|
# Arch installer with some additional packages.
|
|
|
|
#
|
|
|
|
BUILD_DIR=./archlive
|
|
|
|
PKGS=('git' 'de-p1st-keyboard' 'de-p1st-pacman')
|
|
|
|
|
|
|
|
|
|
|
|
################################
|
|
|
|
|
|
|
|
if [ -d "${BUILD_DIR}" ] ; then
|
|
|
|
echo "Build dir does already exist and may not be empty!"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
mkdir "$BUILD_DIR" || exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
# The releng profile is used to create the official monthly installation ISO
|
|
|
|
PROFILE=/usr/share/archiso/configs/releng/
|
|
|
|
if [ ! -d "${PROFILE}" ] ; then
|
|
|
|
echo "Installing dependency 'archiso' with sudo ..."
|
|
|
|
sudo pacman -S --needed archiso || exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp -r "$PROFILE" "$BUILD_DIR"/profile || exit
|
|
|
|
|
|
|
|
# https://wiki.archlinux.org/index.php/Archiso#Custom_local_repository
|
2021-04-28 17:26:17 +02:00
|
|
|
cat pkg/de-p1st-pacman/pacman.d/de-p1st >> "$BUILD_DIR"/profile/pacman.conf || exit
|
2021-04-28 17:21:39 +02:00
|
|
|
|
|
|
|
for PKG in "${PKGS[@]}"; do
|
|
|
|
echo "${PKG}" >> "${BUILD_DIR}"/profile/packages.x86_64
|
|
|
|
done
|
|
|
|
|
|
|
|
###
|
|
|
|
|
|
|
|
mkdir "${BUILD_DIR}/work_dir" && mkdir "${BUILD_DIR}/out_dir" || exit
|
|
|
|
|
|
|
|
echo "running 'sudo mkarchiso' ..."
|
|
|
|
sudo mkarchiso -v -w "${BUILD_DIR}/work_dir" -o "${BUILD_DIR}/out_dir" "${BUILD_DIR}/profile" || exit
|