fix getversion

This commit is contained in:
2024-04-03 10:33:00 -05:00
parent 00fae387a3
commit 614baea53e

View File

@@ -63,13 +63,17 @@ uname -srmpio >> "$LOG"
CPU_PROD=$(sudo lshw | grep "product" | head -1 | cut -d ':' -f2) CPU_PROD=$(sudo lshw | grep "product" | head -1 | cut -d ':' -f2)
echo "CPU product:$CPU_PROD with $THREADS threads" >> $LOG echo "CPU product:$CPU_PROD with $THREADS threads" >> $LOG
# Find versions of files # Find versions of libs
cd /usr/local/lib || exit LDD_TEXT="$BENCHMARK_DIR/ldd.txt"
SVTAV1_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "libSvtAv1Enc.so")") ldd $(which ffmpeg) > "$LDD_TEXT"
RAV1E_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "librav1e.so")") get_version() {
AOM_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "libaom.so")") cat "$LDD_TEXT" | grep "$1" | cut -d' ' -f3 | xargs readlink
VMAF_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "libvmaf.so")") }
DAV1D_VER=$(basename "$(find . -mindepth 1 ! -type l | grep "libdav1d.so")") SVTAV1_VER=$(get_version "libSvtAv1Enc")
RAV1E_VER=$(get_version "librav1e")
AOM_VER=$(get_version "libaom")
VMAF_VER=$(get_version "libvmaf")
DAV1D_VER=$(get_version "libdav1d")
cd "$BASE_DIR" || exit cd "$BASE_DIR" || exit
echo -e "$SVTAV1_VER $RAV1E_VER $AOM_VER $VMAF_VER $DAV1D_VER" >> "$LOG" echo -e "$SVTAV1_VER $RAV1E_VER $AOM_VER $VMAF_VER $DAV1D_VER" >> "$LOG"