blob: f932519ca25693407453e4e0c110cba572fac981 [file] [log] [blame]
Piotr Krysik1ad0c962017-08-31 21:58:48 +02001#!/bin/bash
2#
3# Copyright 2008-2011 Free Software Foundation, Inc.
4#
5# This file is part of GNU Radio
6#
7# GNU Radio is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 3, or (at your option)
10# any later version.
11#
12# GNU Radio is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with GNU Radio; see the file COPYING. If not, write to
19# the Free Software Foundation, Inc., 51 Franklin Street,
20# Boston, MA 02110-1301, USA.
21#
22##################################################
23# setup grc on a freedesktop platform
24# $1 should be install or uninstall
25# $2 is the optional path to the files
26# when $2 is unspecified, the path is:
27# @SRCDIR@
28##################################################
29
30if [ -n "$2" ]; then
31 SRCDIR="$2"
32else
33 SRCDIR="@SRCDIR@"
34fi
35
36case "$1" in
37'install')
38 echo "Begin freedesktop install..."
39 echo "Install menu items"
40 xdg-desktop-menu install ${SRCDIR}/*.desktop
41 echo "Done!"
42 echo ""
43 ;;
44'uninstall')
45 echo "Begin freedesktop uninstall..."
46 echo "Uninstall menu items"
47 xdg-desktop-menu uninstall `ls ${SRCDIR}/*.desktop | xargs -n1 basename`
48 echo "Done!"
49 echo ""
50 ;;
51*)
52 echo "Usage: $0 [install|uninstall]"
53 ;;
54esac