freebsd-ports/sysutils/fusefs-simple-mtpfs/files/special_simple-mtpfs.in
Tijl Coosemans 6cd96f0b4b - Convert to USES=autoreconf
- Replace MAKE_ENV=V=1 with CONFIGURE_ARGS=--disable-silent-rules
- improve |automountd -d| output a bit by not redirecting stderr
- s/simple-mtpfs/${PORTNAME}/ to save from typos in future
- add a comment about why /etc/autofs doesn't install under PREFIX yet

PR:		193882
Submitted by:	Jan Beich <jbeich@vfemail.net> (maintainer)
2014-09-25 17:03:22 +00:00

18 lines
425 B
Bash

#!/bin/sh
#
# Intended for use with /etc/auto_master containing
# /mtp -simple-mtpfs -allow_other
#
out=$(%%PREFIX%%/bin/simple-mtpfs --list-devices)
[ $? -eq 0 ] || exit 1
if [ $# -eq 0 ]; then
echo "$out" | sed 's/[^:]*: //' | sort -u
exit 0
fi
devno=$(echo "$out" | (fgrep "$1" || echo 0) | sed 's/:.*//')
[ $devno -gt 0 ] || exit 1
echo "/ -fstype=none,--device=$devno,mountprog=%%PREFIX%%/bin/simple-mtpfs :none"