#!/bin/bash
if [ $(basename "$0") = "nv-nsight-cu-cli" ]; then
    echo "Note: nv-nsight-cu-cli wrapper is deprecated in favor of ncu and will be removed in a future version." >> /dev/stderr
fi

APPDIR="$(dirname "$(readlink -f -- "$0")")"

ARCH="$(uname -m)"

if   [ "$ARCH" = "x86_64" ]; then
    "$APPDIR/target/linux-desktop-glibc_2_11_3-x64/ncu" "$@"
elif [ "$ARCH" = "ppc64le" ]; then
    "$APPDIR/target/linux-desktop-glibc_2_19_0-ppc64le/ncu" "$@"
elif [ "$ARCH" = "aarch64" ]; then
    "$APPDIR/target/linux-desktop-t210-a64/ncu" "$@"
else
    echo "Unsupported Architecture: $ARCH"
fi
