5
0
Fork 0
mirror of https://codeberg.org/Computertruhe/Setup-Skripte.git synced 2025-06-28 19:36:21 +02:00

more Linux Mint Custom-ISO shell script cleanups

This commit is contained in:
stefan230 2020-03-09 18:04:03 +01:00
parent cac50cd166
commit b88f77de23

View file

@ -5,30 +5,29 @@
UNATTENDED="unattended-$1" # => unattended-linuxmint-19.3-cinnamon-64bit.iso UNATTENDED="unattended-$1" # => unattended-linuxmint-19.3-cinnamon-64bit.iso
#catch if argument 1 is empty. Without the ISO as an argument this script won't work #catch if argument 1 is empty. Without the ISO as an argument this script won't work
if [ -z "$1" ] if [[ -z $1 ]]
then echo "Usage: $0 [linuxmint-original.iso]"
then echo "Usage: $0 [linuxmint-original.iso]" exit
exit
#catch if the file cannot be found or is misspelled. #catch if the file cannot be found or is misspelled.
elif [[ ! -f $1 ]]; then elif [[ ! -f $1 ]]; then
echo "File not found: $1" >&2 echo "File not found: $1" >&2
exit 1 exit 1
else fi
#creates a folders that is used during the process. #creates a folders that is used during the process.
mkdir iso mkdir iso
#copies the iso to the created folder and makes the installed files writable. #copies the iso to the created folder and makes the installed files writable.
bsdtar -xf $1 -C ./iso bsdtar -xf "$1" -C ./iso
chmod -R u+w ./iso chmod -R u+w ./iso
#copies the computertruhe.seed from codeberg-repo so always the latest preseed-file is used. #copies the computertruhe.seed from codeberg-repo so always the latest preseed-file is used.
curl https://codeberg.org/Computertruhe/Setup-Skripte/raw/branch/master/mint/computertruhe.seed > ./iso/preseed/linuxmint.seed curl https://codeberg.org/Computertruhe/Setup-Skripte/raw/branch/master/mint/computertruhe.seed > ./iso/preseed/linuxmint.seed
#creates the custom-iso with the given parameters. #creates the custom-iso with the given parameters.
mkisofs -D -r -V "UNATTENDED_MINT" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o $UNATTENDED ./iso mkisofs -D -r -V "UNATTENDED_MINT" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o "$UNATTENDED" ./iso
#umounts the iso and clears up the space we used to create the iso. #umounts the iso and clears up the space we used to create the iso.
rm -rf ./iso rm -rf ./iso
@ -36,4 +35,3 @@ rm -rf ./iso
#from here we are basically done and the iso can be "burned" on an USB ready for install. #from here we are basically done and the iso can be "burned" on an USB ready for install.
echo "Die Custom ISO wurde fertiggestellt und kann nun verwendet werden. Die ISO ist unter $UNATTENDED zu finden." echo "Die Custom ISO wurde fertiggestellt und kann nun verwendet werden. Die ISO ist unter $UNATTENDED zu finden."
fi