aboutsummaryrefslogtreecommitdiff
path: root/xdg-add
blob: d572ba98b54bd95214539fd5b5bed7720af31551 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
#
# A xdg-mime shortcut.
#

# Parameters
APP="$1"
FILETYPE="$2"

# Check if second param is a file
if [ -e "$FILETYPE" ]; then
  FILETYPE="`xdg-mime query filetype $FILETYPE`"
fi

# Make association
xdg-mime default ${APP}.desktop $FILETYPE