summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorben2022-11-05 10:54:09 +0100
committerTorben2022-11-05 10:54:09 +0100
commit4bd3c81436c7a81f90e24f211e7e65ed00c4ef73 (patch)
tree06207907c2b50cd1ec0bcf883a539a12d70fb521
parentedb74e59a169e8c9753af394678caaf21657cdfa (diff)
downloadaur-4bd3c81436c7a81f90e24f211e7e65ed00c4ef73.tar.gz
Check if java and ffmpeg executables actually exist
-rw-r--r--PKGBUILD15
1 files changed, 13 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 26959c928620..64d437072456 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,6 +27,17 @@ pkgver() {
}
prepare() {
+ # Check if OpenJDK 17 executable is actually installed
+ if ! [ -f "/usr/lib/jvm/java-17-openjdk/bin/java" ]; then
+ echo "Error: OpenJDK 17 executable '/usr/lib/jvm/java-17-openjdk/bin/java' is missing."
+ sh -c "exit 1"
+ fi
+ # Check if FFmpeg executable is actually installed
+ if ! [ -f "/usr/bin/ffmpeg" ]; then
+ echo "Error: FFmpeg executable '/usr/bin/ffmpeg' is missing."
+ sh -c "exit 1"
+ fi
+
# The size of a full clone is more than 1GB, so we just make a shallow clone
# Fetching 1000 commits is hopefully enough to find the latest version tag
rm -rf $pkgname
@@ -69,8 +80,8 @@ package() {
# Link processing's internal java-command to the system's one
mkdir -p "$pkgdir/usr/share/processing/java/bin/"
- ln -s /usr/lib/jvm/java-17-openjdk/bin/java "$pkgdir/usr/share/processing/java/bin/java"
+ ln -s "/usr/lib/jvm/java-17-openjdk/bin/java" "$pkgdir/usr/share/processing/java/bin/java"
# Link processing's internal ffmpeg-command to the system's one
- ln -s /usr/bin/ffmpeg "$pkgdir/usr/share/processing/tools/MovieMaker/tool/"
+ ln -s "/usr/bin/ffmpeg" "$pkgdir/usr/share/processing/tools/MovieMaker/tool/"
}