~alextee/zrythm

zrythm/scripts/meson-post-install.sh -rw-r--r-- 1.0 KiB
e5ebae34Alexandros Theodotou release-beta: bump to beta 2.1 23 days ago
                                                                                
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
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env sh
#
# SPDX-FileCopyrightText: © 2019-2021 Alexandros Theodotou <alex@zrythm.org>
# SPDX-License-Identifier: LicenseRef-ZrythmLicense

prefix="$MESON_INSTALL_DESTDIR_PREFIX"
datadir="$prefix/share"
schemadir="$datadir/glib-2.0/schemas"
fontsdir="$datadir/fonts/zrythm"
desktop_db_dir="$datadir/applications"
mime_dir="$datadir/mime"
doc_dir="$datadir/doc/zrythm"

if [ ! "$DESTDIR" ]; then
  echo "Compiling gsettings schemas..."
  glib-compile-schemas $schemadir

  if command -v gtk-update-icon-cache; then
    echo "Updating icon cache..."
    touch "$datadir/icons/hicolor"
    gtk-update-icon-cache
  fi

  if command -v update-mime-database; then
    echo "Updating MIME database..."
    update-mime-database "$mime_dir"
  fi

  if command -v update-desktop-database; then
    echo "Updating desktop database..."
    if [ ! -e  "$desktop_db_dir" ]; then
      mkdir -p "$desktop_db_dir"
    fi
    update-desktop-database -q "$desktop_db_dir"
  fi

  if command -v update-gdk-pixbuf-loaders; then
    update-gdk-pixbuf-loaders
  fi
fi