aboutsummaryrefslogtreecommitdiff
path: root/system/gigolo/gnome-mount
blob: e3b6323fcd5b4ef94cc94117b9aedc6dbdc59341 (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
#
# gnome-mount - wrapper script for use with exo-mount
#
# Copyright 2009 Enrico Tröger <enrico(at)xfce(dot)org>
# Licence: GPLv2
#
# This script aims to be a wrapper script to provide the
# gnome-mount utility on envrionments which only have
# exo-mount (e.g. Xfce). It accepts all command line arguments
# which are passed but ignores all which are not supported by
# exo-mount.
#
# Possible use case is as a drop-in replacement to get mounting
# local resources with GVfs working, e.g. mounting disks in CD drives.

# Retrieved from http://files.uvena.de/gnome-mount
# (slightly modified to remove extraneous information)


OPTS=""

# first catch all passed arguments and keep those exo-mount supports,
# ignore all other arguments
while [ -n "$*" ]
do
	case $1 in
		-\?|--help)
		OPTS="$OPTS --help"
		;;
		-e|--eject)
		OPTS="$OPTS --eject"
		;;
		-u|--unmount)
		OPTS="$OPTS --unmount"
		;;
		-h|--hal-udi)
		OPTS="$OPTS --hal-udi"
		shift
		OPTS="$OPTS $1"
		;;
		-d|--device)
		OPTS="$OPTS --device"
		shift
		OPTS="$OPTS $1"
		;;
		-n|--no-ui)
		OPTS="$OPTS --no-ui"
		;;
		-V|--version)
		OPTS="$OPTS --version"
		;;
	esac
	shift
done

# now run exo-mount and hope things go well
exo-mount $OPTS