feat(macos-compatibility): add os-specific dependency checks and installation help

This commit is contained in:
sidneys 2020-04-07 22:41:41 +02:00
parent bc30c2bdb9
commit 687fb34245

View File

@ -284,16 +284,27 @@ fi
if ! which cabextract >/dev/null 2>&1 \ if ! which cabextract >/dev/null 2>&1 \
|| ! which wimlib-imagex >/dev/null 2>&1 \ || ! which wimlib-imagex >/dev/null 2>&1 \
|| ! which chntpw >/dev/null 2>&1 \ || ! which chntpw >/dev/null 2>&1 \
|| ! which genisoimage >/dev/null 2>&1; then || ! which genisoimage >/dev/null 2>&1 \
&& ! which mkisofs >/dev/null 2>&1; 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 " - genisoimage" echo " - genisoimage (or mkisofs)"
echo "" echo ""
if [[ "$(uname)" == "Linux" ]]; then
# 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
# macOS
echo "If you use Homebrew, you can install these using:"
echo "brew tap sidneys/homebrew"
echo "brew install cabextract wimlib cdrtools sidneys/homebrew/chntpw"
fi
exit 1 exit 1
fi fi