mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 02:47:56 +01:00
Split Makfile and move workflow to Makefile (#88)
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
This commit is contained in:
parent
662f1a94e4
commit
b669420287
40 changed files with 800 additions and 665 deletions
13
xorriso/Makefile
Normal file
13
xorriso/Makefile
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
input.txt: gen_input.sh
|
||||
sed -i 's/quiet/quiet $(EXTRA_BOOT_PARAMS)/g' ../results/boot/grub2/grub.cfg
|
||||
sed -i 's/quiet/quiet $(EXTRA_BOOT_PARAMS)/g' ../results/EFI/BOOT/grub.cfg
|
||||
$(eval _VARS = ARCH FLATPAK_DIR IMAGE_NAME IMAGE_TAG ISO_NAME VERSION)
|
||||
$(foreach var,$(_VARS),$(var)=$($(var))) bash gen_input.sh | tee input.txt
|
||||
|
||||
install-deps:
|
||||
|
||||
FILES=$(wildcard input.txt)
|
||||
clean:
|
||||
ifneq ($(FILES),)
|
||||
rm -Rf $(FILES)
|
||||
endif
|
||||
50
xorriso/gen_input.sh
Normal file
50
xorriso/gen_input.sh
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "-report_about WARNING"
|
||||
echo "-indev ${PWD}/../results/images/boot.iso"
|
||||
echo "-outdev ${ISO_NAME}"
|
||||
echo "-boot_image any replay"
|
||||
echo "-joliet on"
|
||||
echo "-compliance joliet_long_names"
|
||||
pushd "${PWD}/../results" > /dev/null
|
||||
#for file in $(find .)
|
||||
for file in ./boot/grub2/grub.cfg ./EFI/BOOT/grub.cfg
|
||||
do
|
||||
if [[ "$file" == "./images/boot.iso" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
echo "-map ${PWD}/${file} ${file:2}"
|
||||
echo "-chmod 0444 ${file:2}"
|
||||
done
|
||||
popd > /dev/null
|
||||
|
||||
if [[ -n "${FLATPAK_DIR}" ]]
|
||||
then
|
||||
pushd "${FLATPAK_DIR}" > /dev/null
|
||||
for file in $(find repo)
|
||||
do
|
||||
if [[ "${file}" == "repo/.lock" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
echo "-map ${PWD}/${file} flatpak/${file}"
|
||||
echo "-chmod 0444 flatpak/${file}"
|
||||
done
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
if [ -f $(pwd)/sb_pubkey.der ]
|
||||
then
|
||||
echo "-map $(pwd)/../sb_pubkey.der sb_pubkey.der"
|
||||
echo "-chmod 0444 /sb_pubkey.der"
|
||||
fi
|
||||
|
||||
pushd "${PWD}/../container" > /dev/null
|
||||
for file in $(find "${IMAGE_NAME}-${IMAGE_TAG}" -type f)
|
||||
do
|
||||
echo "-map ${PWD}/${file} ${file}"
|
||||
echo "-chmod 0444 ${file}"
|
||||
done
|
||||
popd > /dev/null
|
||||
echo "-end"
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "-indev $(pwd)/boot.iso"
|
||||
echo "-outdev $(pwd)/build/deploy.iso"
|
||||
echo "-boot_image any replay"
|
||||
echo "-joliet on"
|
||||
echo "-compliance joliet_long_names"
|
||||
echo "-map $(pwd)/results/boot/grub2/grub.cfg boot/grub2/grub.cfg"
|
||||
echo "-chmod 0444 boot/grub2/grub.cfg"
|
||||
echo "-map $(pwd)/results/EFI/BOOT/grub.cfg EFI/BOOT/grub.cfg"
|
||||
echo "-chmod 0444 EFI/BOOT/grub.cfg"
|
||||
|
||||
if [[ -n "${FLATPAK_DIR}" ]]
|
||||
then
|
||||
pushd ${FLATPAK_DIR} > /dev/null
|
||||
for file in $(find *)
|
||||
do
|
||||
echo "-map $(pwd)/${file} flatpak/${file}"
|
||||
echo "-chmod 0444 flatpak/${file}"
|
||||
done
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
if [ -f $(pwd)/sb_pubkey.der ]
|
||||
then
|
||||
echo "-map $(pwd)/sb_pubkey.der sb_pubkey.der"
|
||||
echo "-chmod 0444 /sb_pubkey.der"
|
||||
fi
|
||||
|
||||
pushd container > /dev/null
|
||||
for file in $(find ${IMAGE_NAME}-${IMAGE_TAG})
|
||||
do
|
||||
echo "-map $(pwd)/${file} ${file}"
|
||||
echo "-chmod 0444 ${file}"
|
||||
done
|
||||
popd > /dev/null
|
||||
echo "-end"
|
||||
Loading…
Add table
Add a link
Reference in a new issue