]> gitweb.morketsmerke.org Git - immudex-testing.git/commitdiff
Zapisano poprzednią ścieżkę przed przjeściem do katalogu GRUB-a w katalogu 'staging...
authorxf0r3m <jakubstasinski@protonmail.com>
Thu, 17 Aug 2023 08:51:56 +0000 (10:51 +0200)
committerxf0r3m <jakubstasinski@protonmail.com>
Thu, 17 Aug 2023 08:51:56 +0000 (10:51 +0200)
immudex-build

index ed79a56025241e408bc5b009afe02ac268205282..27917278c81ba153571c5b67665e0c8287e6951b 100755 (executable)
@@ -17,7 +17,7 @@ function help() {
 
 function create_enviroment() {
   echo -n "Installation of packages needed to build immudex...";
-  sudo apt update >> ~/immudex_build.log 2>&1;
+  sudo apt update >> immudex_build.log 2>&1;
   sudo apt install -y debootstrap squashfs-tools xorriso isolinux syslinux-efi grub-pc-bin grub-efi-amd64-bin mtools dosfstools >> immudex_build.log 2>&1;
   if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
 }
@@ -51,7 +51,7 @@ if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
 
 #Copying chroot script to chroot directory:
 echo -n "Copying chroot script to chroot directory...";
-sudo cp -vv ${HOME}/immudex-testing/versions/base.sh ${HOME}/build/immudex-testing/${arch}/chroot >> ~/immudex_build.log 2>&1;
+sudo cp -vv ${HOME}/immudex-testing/versions/base.sh ${HOME}/build/immudex-testing/${arch}/chroot >> immudex_build.log 2>&1;
 if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
 
 #Executing chroot script, at least i trying:
@@ -120,16 +120,18 @@ grub-mkstandalone --format=x86_64-efi --output=${HOME}/build/immudex-testing/${a
 if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
 
 #Creating additional EFI partition:
+oldcwd=$(pwd);
 cd ${HOME}/build/immudex-testing/${arch}/staging/boot/grub;
 echo -n "Creating addtitional EFI partition...";
-dd if=/dev/zero bs=1M of=efiboot.img count=20 >> immudex_build.log 2>&1;
+dd if=/dev/zero bs=1M of=efiboot.img count=20 >> ${oldcwd}/immudex_build.log 2>&1;
 sudo mkfs.vfat efiboot.img >> immudex_build.log 2>&1;
-echo "-==Creating MS-DOS directory: $(date)==-" >> immudex_build.log;
-sudo mmd -i efiboot.img efi efi/boot >> immudex_build.log 2>&1;
-sudo mcopy -vi efiboot.img ${HOME}/build/immudex-testing/${arch}/staging/EFI/boot/bootx64.efi ::efi/boot >> immudex_build.log 2>&1;
+echo "-==Creating MS-DOS directory: $(date)==-" >> ${oldcwd}/immudex_build.log;
+sudo mmd -i efiboot.img efi efi/boot >> ${oldcwd}/immudex_build.log 2>&1;
+sudo mcopy -vi efiboot.img ${HOME}/build/immudex-testing/${arch}/staging/EFI/boot/bootx64.efi ::efi/boot >> ${oldcwd}/immudex_build.log 2>&1;
 if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
 
 #Create iso image:
+cd $oldcwd;
 echo -n "Creating iso image...";
 xorriso as mkisofs -iso-level 3 -o "immudex-testing${arch}.iso" -full-iso9660-filenames -volid "immudex-testing${arch}" -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -eltorito-boot isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table --eltorito-catalog isolinux/isolinux.cat -eltorito-alt-boot -e /boot/grub/efiboot.img -no-emul-boot -isohybrid-gpt-basdat -append_partition 2 0xef ${HOME}/build/immudex-testing/${arch}/staging/boot/grub/efiboot.img ${HOME}/build/immudex-testing/${arch}/staging >> immudex_build.log 2>&1;
 if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi