#!/bin/sh set -eu . "$(dirname -- "$0")/setup-ohos-env.sh" SOURCE_ROOT=$OHOS_BUILD_ROOT/sources mkdir -p "$SOURCE_ROOT" fetch_ref() { name=$1 repository=$2 reference=$3 destination=$SOURCE_ROOT/$name if test ! -d "$destination/.git"; then mkdir -p "$destination" git -C "$destination" init git -C "$destination" remote add origin "$repository" fi git -C "$destination" fetch --depth 1 origin "$reference" git -C "$destination" checkout --detach FETCH_HEAD printf '%-12s %s %s\n' "$name" "$(git -C "$destination" rev-parse HEAD)" "$(git -C "$destination" describe --tags --always)" } fetch_ref openssl https://github.com/openssl/openssl.git openssl-3.6.4 fetch_ref ffmpeg https://git.ffmpeg.org/ffmpeg.git 3acec0a1af2dda0a0838689b8b8649e7deb080a0 fetch_ref freetype https://github.com/freetype/freetype.git VER-2-14-3 fetch_ref fribidi https://github.com/fribidi/fribidi.git v1.0.16 fetch_ref harfbuzz https://github.com/harfbuzz/harfbuzz.git 14.4.0 fetch_ref libass https://github.com/libass/libass.git 0.17.5 fetch_ref libplacebo https://code.videolan.org/videolan/libplacebo.git v7.360.1 git -C "$SOURCE_ROOT/libplacebo" submodule update --init --depth 1