#!/bin/fish
if fish_is_root_user
    echo 'Global installation'
    install -Dm755 jellynative /usr/local/bin/jellynative
    install -Dm644 jellynative.desktop /usr/local/share/applications/jellynative.desktop
    update-desktop-database /usr/local/share/applications
else
    echo 'User installation'
    install -Dm750 jellynative ~/.local/bin/jellynative
    install -Dm640 jellynative.desktop ~/.local/share/applications/jellynative.desktop
    update-desktop-database ~/.local/share/applications
end
echo 'In firefox about:config set network.protocol-handler.expose.jellynative to true'
