2023-10-07 19:40:23 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# In case we are on SteamOS?
|
|
|
|
#set -x
|
|
|
|
# The usual system-wide installation
|
|
|
|
if [ -f /usr/bin/mpv ]; then
|
2024-03-20 05:50:18 +01:00
|
|
|
/usr/bin/mpv "$@"
|
2023-10-07 19:40:23 +02:00
|
|
|
# System-wide flatpak
|
|
|
|
elif [ -f /var/lib/flatpak/exports/bin/io.mpv.Mpv ]; then
|
2024-03-20 05:50:18 +01:00
|
|
|
flatpak run io.mpv.Mpv "$@"
|
2023-10-07 19:40:23 +02:00
|
|
|
# User-specific flatpak
|
|
|
|
elif [ -f ~/.local/share/flatpak/exports/bin/io.mpv.Mpv ]; then
|
2024-03-20 05:50:18 +01:00
|
|
|
flatpak run --user io.mpv.Mpv "$@"
|
2023-10-07 19:40:23 +02:00
|
|
|
# If not found.
|
|
|
|
else
|
|
|
|
printf "mpv doesn't seem to be installed :("
|
|
|
|
fi
|
|
|
|
#set +x
|