LogarithmPlotter/linux/install_after_setup.sh

13 lines
732 B
Bash
Raw Normal View History

2021-06-21 22:27:40 +00:00
#!/bin/bash
APPROOT="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
echo "Adding desktop file..."
mkdir -p ~/.local/share/applications
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/logarithmplotter.desktop" > ~/.local/share/applications/logarithmplotter.desktop
echo "Installing mime-type..."
mkdir -p ~/.local/share/applications
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/x-logarithm-plotter-old.xml" > ~/.local/share/mime/packages/x-logarithm-plotter.xml
mkdir -p ~/.local/share/icons/hicolor/scalable/mimetypes
cp "$APPROOT/logplotterfile.svg" ~/.local/share/icons/hicolor/scalable/mimetypes/application-x-logarithm-plotter.svg
update-mime-database ~/.local/share/mime/
update-icon-caches ~/.local/share/icons/hicolor