chore(macos-compatibility): consolidate script syntax

This commit is contained in:
sidneys 2020-04-07 23:34:25 +02:00
parent b19bfd5b54
commit cf56b0077a

View File

@ -297,14 +297,14 @@ if ! which cabextract >/dev/null 2>&1 \
echo " - cabextract" echo " - cabextract"
echo " - wimlib-imagex" echo " - wimlib-imagex"
echo " - chntpw" echo " - chntpw"
echo " - genisoimage (or mkisofs)" echo " - genisoimage or mkisofs"
echo "" echo ""
if [[ "$(uname)" == "Linux" ]]; then if [ `uname` == "Linux" ]; then
# Linux # Linux
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 genisoimage" echo "sudo apt-get install cabextract wimtools chntpw genisoimage"
elif [[ "$(uname)" == "Darwin" ]]; then elif [ `uname` == "Darwin" ]; then
# macOS # macOS
echo "If you use Homebrew, you can install these using:" echo "If you use Homebrew, you can install these using:"
echo "brew tap sidneys/homebrew" echo "brew tap sidneys/homebrew"
@ -572,10 +572,10 @@ fi
echo -e "$infoColor""Creating ISO image...""$resetColor" echo -e "$infoColor""Creating ISO image...""$resetColor"
find ISODIR -exec touch {} + find ISODIR -exec touch {} +
# Use mkisofs instead of genisoimage if it was not found # Use mkisofs as fallback to genisoimage
$genisoimage=`which genisoimage >/dev/null 2>&` genisoimage="$(command -v genisoimage)"
if [ -z $genisoimage ]; then if [ -z "$genisoimage" ]; then
$genisoimage=`which mkisofs >/dev/null 2>&` genisoimage="$(command -v mkisofs)"
fi fi
"$genisoimage" -b "boot/etfsboot.com" --no-emul-boot \ "$genisoimage" -b "boot/etfsboot.com" --no-emul-boot \