File: add_csound_mimetypes.sh

package info (click to toggle)
csoundqt 1.1.1%2Bdfsg0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 103,216 kB
  • sloc: cpp: 37,640; python: 2,070; xml: 2,034; sh: 340; makefile: 20; perl: 8
file content (29 lines) | stat: -rwxr-xr-x 849 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

#copy icon for csound mimetypes
SHAREDIR="$1"
if [ -z "$SHAREDIR" ] ; then
	SHAREDIR=/usr/share #~/.local/share # use the latter one for local install
fi
ICONDIR=$SHAREDIR/icons/hicolor/128x128/mimetypes
mkdir -v -p $ICONDIR
# cp -v csound-light-128.png $ICONDIR/csound.png
# cp -v csound-dark-128.png $ICONDIR/csound.png
cp -v csound.png $ICONDIR/csound.png
# cp -v application-x-csound.svg $ICONDIR/csound.svg


#create and register mimetype
MIMEDIR=$SHAREDIR/mime # or /usr/share/mime
DESTDIR=$MIMEDIR/packages
mkdir -v -p $DESTDIR # make if does not exist
cp -v *.xml $DESTDIR
# Only update db if it already exists
# packages will install into empty trees and
# do not need to update

#if [ -f "$MIMEDIR/mime.cache" ] ; then
#	update-mime-database -V $MIMEDIR
#fi

echo "You may need to log out and log in to make changes effective."