wok view sshfs-fuse/stuff/rsshfs @ rev 16758

sshfs-fuse: typos in rsshfs (thanks om)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jun 16 22:45:42 2014 +0200 (2014-06-16)
parents c2a6bbd5b24f
children b55261bbc2a9
line source
1 #!/bin/sh
2 # from https://github.com/rom1v/rsshfs/blob/master/rsshfs
4 rhost="${2%%:*}"
5 rpath="${2#*:}"
6 lpath="$1"
8 case "$1" in
9 -u) ssh "$rhost" fusermount -u "$rpath"
10 ;;
12 ''|-*) cat <<EOT
13 usage:
14 $0 localpath remotehost:remotepath [-o ro -o allow_other]
15 $0 -u remotehost:remotepath
16 EOT
17 ;;
19 *) fifo=/tmp/rsshfs-fifo$$
20 shift 2
21 mkfifo $fifo
22 /usr/sbin/sftp-server < $fifo | \
23 ssh "$rhost" sshfs -o slave ":$lpath" "$rpath" "$@" > $fifo
24 rm -f $fifo
25 esac