I would like to contribute this snippet that warns the user if the installer (silently) fails. This is detected by the $srcdir/build
directory being empty after running the installer:
diff --git a/PKGBUILD b/PKGBUILD
index 50cad05..98adb44 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -49,6 +49,15 @@ build() {
# -inputFile makes the installation non-interactive.
"$srcdir/matlab/install" -inputFile "$srcdir/matlab/installer_input.txt"
+ # if it fails, output dir will be empty and there will be a log entry
+ if [ `ls "$srcdir/build" | wc -l` -eq '0' ]; then
+ error "MATLAB installer failed; check install.log:\n"
+ tail "$srcdir/../install.log"
+ echo ""
+ error "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
+ exit 1
+ fi
+
echo " -> Generating desktop files..."
gendesk -f -n \
--pkgname 'matlab' \
Pinned Comments