Skip to content

Commit a685bc0

Browse files
committed
improve setup.sh
1 parent b33eefe commit a685bc0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

setup.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/bin/sh
22
# one last thing to do: to use the extension, run the following commands in your terminal:
33

4-
curl -sSf "https://raw.githubusercontent.com/binarynoise/open-in-mpv/main/mpv-scheme-handler.desktop" >~/.local/share/applications/mpv-scheme-handler.desktop &&
5-
xdg-mime default mpv-scheme-handler.desktop x-scheme-handler/mpv
4+
set -e
5+
6+
if [ -f mpv-scheme-handler.desktop ]; then
7+
cp mpv-scheme-handler.desktop ~/.local/share/applications/mpv-scheme-handler.desktop
8+
else
9+
curl -sSf "https://raw.githubusercontent.com/binarynoise/open-in-mpv/main/mpv-scheme-handler.desktop" >~/.local/share/applications/mpv-scheme-handler.desktop
10+
fi
11+
12+
xdg-mime default mpv-scheme-handler.desktop x-scheme-handler/mpv

0 commit comments

Comments
 (0)