code cleanup

This commit is contained in:
Tobias Powalowski 2022-01-21 12:02:59 +01:00
parent 1c067f1694
commit 31efa101cf

View file

@ -26,8 +26,8 @@ if ! [[ "$(uname -m)" == "x86_64" ]]; then
exit 1
fi
echo "Start release creation in $1 ..."
mkdir -p $1
cd $1
mkdir -p "$1"
cd "$1" || exit 1
# create container
archboot-x86_64-create-container.sh "${_W_DIR}" -cc -cp || exit 1
# generate tarball in container, umount tmp it's a tmpfs and weird things could happen then
@ -40,7 +40,7 @@ systemd-nspawn -D "${_W_DIR}" /bin/bash -c "pacman -Rdd lvm2 openssh --noconfirm
# generate latest tarball in container
echo "Generate latest ISO ..."
# generate latest iso in container
systemd-nspawn -q -D "${_W_DIR}" /bin/bash -c "umount /tmp;archboot-x86_64-iso.sh -g -p="${_PRESET_LATEST}" -r=$(date +%Y.%m.%d-%H.%M)-latest"
systemd-nspawn -q -D "${_W_DIR}" /bin/bash -c "umount /tmp;archboot-x86_64-iso.sh -g -p=${_PRESET_LATEST} -r=$(date +%Y.%m.%d-%H.%M)-latest"
# create Release.txt with included main archlinux packages
echo "Generate Release.txt ..."
echo "Welcome to ARCHBOOT INSTALLATION / RESCUEBOOT SYSTEM" >>Release.txt
@ -61,7 +61,7 @@ rm -r "${_W_DIR}"
echo "Create boot directory ..."
mkdir -p boot/licenses/{amd-ucode,intel-ucode}
for i in *.iso; do
if [[ ! "$(echo $i | grep latest)" ]]; then
if ! grep -q latest "${i}"; then
isoinfo -R -i "${i}" -x /boot/amd-ucode.img > boot/amd-ucode.img 2>&1
isoinfo -R -i "${i}" -x /boot/intel-ucode.img > boot/intel-ucode.img 2>&1
isoinfo -R -i "${i}" -x /boot/initramfs_x86_64.img > boot/initramfs_archboot_x86_64.img 2>&1