mirror of
https://codeberg.org/B3rtl/Ubuntu-Setup-Skripte
synced 2025-06-28 11:26:08 +02:00
more Linux Mint Custom-ISO shell script cleanups
This commit is contained in:
parent
cac50cd166
commit
b88f77de23
1 changed files with 8 additions and 10 deletions
|
@ -5,30 +5,29 @@
|
|||
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
|
||||
if [ -z "$1" ]
|
||||
|
||||
then echo "Usage: $0 [linuxmint-original.iso]"
|
||||
exit
|
||||
if [[ -z $1 ]]
|
||||
then echo "Usage: $0 [linuxmint-original.iso]"
|
||||
exit
|
||||
|
||||
#catch if the file cannot be found or is misspelled.
|
||||
elif [[ ! -f $1 ]]; then
|
||||
echo "File not found: $1" >&2
|
||||
exit 1
|
||||
echo "File not found: $1" >&2
|
||||
exit 1
|
||||
|
||||
else
|
||||
fi
|
||||
|
||||
#creates a folders that is used during the process.
|
||||
mkdir iso
|
||||
|
||||
#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
|
||||
|
||||
#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
|
||||
|
||||
#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.
|
||||
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.
|
||||
echo "Die Custom ISO wurde fertiggestellt und kann nun verwendet werden. Die ISO ist unter $UNATTENDED zu finden."
|
||||
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue