2022-10-20 19:31:12 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-11-23 17:58:54 +00:00
|
|
|
set -e
|
|
|
|
|
2023-04-29 19:52:42 +00:00
|
|
|
SCRIPT=$(realpath "$0")
|
|
|
|
SCRIPT_PATH=$(dirname "$SCRIPT")
|
|
|
|
|
|
|
|
binExtVar() {
|
|
|
|
php -r "require '$SCRIPT_PATH/../lib/Service/BinExt.php'; echo \OCA\Memories\Service\BinExt::$1;"
|
|
|
|
}
|
|
|
|
|
2023-10-20 21:28:08 +00:00
|
|
|
arch() {
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
if [ "$ARCH" = "x86_64" ]; then
|
|
|
|
ARCH="amd64"
|
|
|
|
elif [ "$ARCH" = "arm64" ]; then
|
|
|
|
ARCH="aarch64"
|
|
|
|
fi
|
|
|
|
echo $ARCH
|
|
|
|
}
|
|
|
|
|
2023-04-29 19:52:42 +00:00
|
|
|
EXIFTOOL_VER=$(binExtVar EXIFTOOL_VER)
|
|
|
|
GOVOD_VER=$(binExtVar GOVOD_VER)
|
2022-10-20 19:31:12 +00:00
|
|
|
|
2023-10-20 21:28:08 +00:00
|
|
|
# Get exiftool prebuilt binaries
|
2023-10-20 19:35:35 +00:00
|
|
|
rm -rf bin-ext
|
|
|
|
mkdir -p bin-ext
|
|
|
|
cd bin-ext
|
2023-04-29 19:52:42 +00:00
|
|
|
echo "Getting exiftool $EXIFTOOL_VER"
|
|
|
|
wget -q "https://github.com/pulsejet/exiftool-bin/releases/download/$EXIFTOOL_VER/exiftool-amd64-musl"
|
|
|
|
wget -q "https://github.com/pulsejet/exiftool-bin/releases/download/$EXIFTOOL_VER/exiftool-amd64-glibc"
|
|
|
|
wget -q "https://github.com/pulsejet/exiftool-bin/releases/download/$EXIFTOOL_VER/exiftool-aarch64-musl"
|
|
|
|
wget -q "https://github.com/pulsejet/exiftool-bin/releases/download/$EXIFTOOL_VER/exiftool-aarch64-glibc"
|
2022-10-20 19:31:12 +00:00
|
|
|
chmod 755 *
|
2022-10-20 20:41:34 +00:00
|
|
|
|
2023-10-20 21:28:08 +00:00
|
|
|
# Get exiftool source
|
2023-04-29 19:52:42 +00:00
|
|
|
wget -q "https://github.com/exiftool/exiftool/archive/refs/tags/$EXIFTOOL_VER.zip"
|
|
|
|
unzip -qq "$EXIFTOOL_VER.zip"
|
|
|
|
mv "exiftool-$EXIFTOOL_VER" exiftool
|
2023-03-21 18:05:10 +00:00
|
|
|
rm -rf *.zip exiftool/t exiftool/html exiftool/windows_exiftool
|
2022-10-20 20:41:34 +00:00
|
|
|
chmod 755 exiftool/exiftool
|
|
|
|
|
2023-10-20 21:28:08 +00:00
|
|
|
# Get go-vod prebuilt binaries
|
2023-04-29 19:52:42 +00:00
|
|
|
echo "Getting go-vod $GOVOD_VER"
|
2023-11-01 17:14:24 +00:00
|
|
|
wget -q "https://github.com/pulsejet/memories/releases/download/go-vod/$GOVOD_VER/go-vod-amd64"
|
|
|
|
wget -q "https://github.com/pulsejet/memories/releases/download/go-vod/$GOVOD_VER/go-vod-aarch64"
|
2022-11-11 05:25:26 +00:00
|
|
|
chmod 755 go-vod-*
|
2022-11-09 09:23:12 +00:00
|
|
|
|
2023-10-20 21:28:08 +00:00
|
|
|
# Check the version of go-vod is correct internally
|
|
|
|
if [ "$(./go-vod-$(arch) -version)" != "go-vod $GOVOD_VER" ]; then
|
|
|
|
echo "[BUG] go-vod binary version mismatch"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-10-20 19:31:12 +00:00
|
|
|
cd ..
|