LogarithmPlotter/linux/install_after_setup.sh

12 lines
732 B
Bash

#!/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