mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-23 01:16:04 +01:00
50 lines
1.5 KiB
Bash
Executable File
50 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# https://wiki.archlinux.org/index.php/Archiso#Prepare_a_custom_profile
|
|
#
|
|
# Arch installer with some additional packages:
|
|
# -> de-p1st-installer
|
|
# -> de-p1st mirror in pacman.conf
|
|
# -> german keyboard
|
|
# -> git
|
|
#
|
|
BUILD_DIR=./archlive
|
|
PKGS=('git' 'de-p1st-keyboard' 'de-p1st-pacman' 'de-p1st-pacman-mirrorlist' 'de-p1st-systemd' 'de-p1st-installer')
|
|
PACMAN_CFG_ADDITION='pkg/de-p1st-pacman/pacman.d/de-p1st' # will be used to extend the builder's pacman.conf
|
|
|
|
|
|
################################
|
|
|
|
if [ "$1" = "clean" ] ; then
|
|
sudo rm -r "${BUILD_DIR}" || exit
|
|
elif [ -d "${BUILD_DIR}" ] ; then
|
|
echo "Build dir does already exist and may not be empty!"
|
|
echo "Run '$0 clean' to start a clean ISO build."
|
|
exit 1
|
|
fi
|
|
|
|
mkdir "$BUILD_DIR" || exit
|
|
|
|
# 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
|
|
cat "${PACMAN_CFG_ADDITION}" >> "$BUILD_DIR"/profile/pacman.conf || exit
|
|
|
|
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
|