Switch back to genisoimage, fix a few bugs

This commit is contained in:
mkuba50 2019-02-20 19:44:26 +01:00
parent dc14b921d9
commit 2c9eeaa109
2 changed files with 13 additions and 13 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
scriptName="UUP Converter v0.3.0" scriptName="UUP Converter v0.4.0"
editions='analogonecore editions='analogonecore
andromeda andromeda
@ -240,16 +240,16 @@ fi
if ! which cabextract >/dev/null \ if ! which cabextract >/dev/null \
|| ! which wimlib-imagex >/dev/null \ || ! which wimlib-imagex >/dev/null \
|| ! which chntpw >/dev/null \ || ! which chntpw >/dev/null \
|| ! which xorriso >/dev/null; then || ! which genisoimage >/dev/null; then
echo "One of required applications is not installed." echo "One of required applications is not installed."
echo "The following applications need to be installed to use this script:" echo "The following applications need to be installed to use this script:"
echo " - cabextract" echo " - cabextract"
echo " - wimlib-imagex" echo " - wimlib-imagex"
echo " - chntpw" echo " - chntpw"
echo " - xorriso" echo " - genisoimage"
echo "" echo ""
echo "If you use Debian or Ubuntu you can install these using:" echo "If you use Debian or Ubuntu you can install these using:"
echo "sudo apt-get install cabextract wimtools chntpw xorriso" echo "sudo apt-get install cabextract wimtools chntpw genisoimage"
exit 1 exit 1
fi fi
@ -305,8 +305,8 @@ fi
list= list=
lang=$(grep "_..-.*.esd" <<< "$metadataFiles" | head -1 | sed 's/.*_//g;s/.esd//g') lang=$(grep -i "_..-.*.esd" <<< "$metadataFiles" | head -1 | sed 's/.*_//g;s/.esd//gi')
metadataFiles=$(grep "$lang" <<< "$metadataFiles" | sort | uniq) metadataFiles=$(grep -i "$lang" <<< "$metadataFiles" | sort | uniq)
firstMetadata=$(head -1 <<< "$metadataFiles") firstMetadata=$(head -1 <<< "$metadataFiles")
tempDir=`mktemp -d` tempDir=`mktemp -d`
@ -314,7 +314,7 @@ extractDir="$tempDir/extract"
echo -e "\033[1m$scriptName\033[0m" echo -e "\033[1m$scriptName\033[0m"
for file in `find "$uupDir" -type f -name "*.cab"`; do for file in `find "$uupDir" -type f -iname "*.cab"`; do
fileName=`basename $file .cab` fileName=`basename $file .cab`
echo -e "$infoColor""CAB -> ESD:""$resetColor"" $fileName" echo -e "$infoColor""CAB -> ESD:""$resetColor"" $fileName"
@ -481,7 +481,7 @@ else
isoEdition=`grep -i "^Edition ID:" <<< "$info" | sed "s/.* //g"` isoEdition=`grep -i "^Edition ID:" <<< "$info" | sed "s/.* //g"`
fi fi
isoLabel=`tr "[:lower:]" "[:upper:]" <<< "${build}.${spbuild}"` isoLabel=`tr "[:lower:]" "[:upper:]" <<< "${build}.${spbuild}_${arch}_${lang}"`
isoName=`tr "[:lower:]" "[:upper:]" <<< "${build}.${spbuild}_${isoEdition}_${arch}_${lang}.iso"` isoName=`tr "[:lower:]" "[:upper:]" <<< "${build}.${spbuild}_${isoEdition}_${arch}_${lang}.iso"`
if [ -e "$isoName" ]; then if [ -e "$isoName" ]; then
@ -491,9 +491,9 @@ fi
echo -e "$infoColor""Creating ISO image...""$resetColor" echo -e "$infoColor""Creating ISO image...""$resetColor"
find ISODIR -exec touch {} + find ISODIR -exec touch {} +
xorriso -as mkisofs -b "boot/etfsboot.com" --no-emul-boot \ genisoimage -b "boot/etfsboot.com" --no-emul-boot \
--eltorito-alt-boot -e "efi/microsoft/boot/efisys.bin" --no-emul-boot \ --eltorito-alt-boot -b "efi/microsoft/boot/efisys.bin" --no-emul-boot \
-J -joliet-long -V "$isoLabel" -o "$isoName" ISODIR --udf --hide "*" -V "$isoLabel" -o "$isoName" ISODIR
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo -e "$errorColor""Failed to create ISO image""$resetColor" echo -e "$errorColor""Failed to create ISO image""$resetColor"

View File

@ -33,13 +33,13 @@ This script uses the following commands to do its work:
* cabextract - to extract cabs * cabextract - to extract cabs
* wimlib-imagex - to export files from metadata ESD * wimlib-imagex - to export files from metadata ESD
* chntpw - to modify registry of first index of boot.wim * chntpw - to modify registry of first index of boot.wim
* xorriso - to create ISO image * genisoimage - to create ISO image
If you use Debian or Ubuntu based distribution you can quickly install these If you use Debian or Ubuntu based distribution you can quickly install these
using the following command: using the following command:
``` ```
sudo apt-get install cabextract wimtools chntpw xorriso sudo apt-get install cabextract wimtools chntpw genisoimage
``` ```
If you use any other distribution, then you will need to check its repository If you use any other distribution, then you will need to check its repository