bash/usr-local-bin/mpv: initial commit of system-wide mpv and flatpak mpvs

This commit is contained in:
Aminda Suomalainen 2023-10-07 20:40:23 +03:00
parent 450ff51fa9
commit 6bf64e6281
Signed by: Mikaela
SSH Key Fingerprint: SHA256:y2OpGEbett3Fqn8XFrP0X4mWfCVKf4rWkxERzqPY81U
1 changed files with 17 additions and 0 deletions

17
bash/usr-local-bin/mpv Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# In case we are on SteamOS?
#set -x
# The usual system-wide installation
if [ -f /usr/bin/mpv ]; then
/usr/bin/mpv $@
# System-wide flatpak
elif [ -f /var/lib/flatpak/exports/bin/io.mpv.Mpv ]; then
flatpak run io.mpv.Mpv $@
# User-specific flatpak
elif [ -f ~/.local/share/flatpak/exports/bin/io.mpv.Mpv ]; then
flatpak run --user io.mpv.Mpv $@
# If not found.
else
printf "mpv doesn't seem to be installed :("
fi
#set +x