wok-6.x annotate 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
rev   line source
pascal@16756 1 #!/bin/sh
pascal@16756 2 # from https://github.com/rom1v/rsshfs/blob/master/rsshfs
pascal@16756 3
pascal@16758 4 rhost="${2%%:*}"
pascal@16756 5 rpath="${2#*:}"
pascal@16756 6 lpath="$1"
pascal@16756 7
pascal@16758 8 case "$1" in
pascal@16756 9 -u) ssh "$rhost" fusermount -u "$rpath"
pascal@16756 10 ;;
pascal@16756 11
pascal@16756 12 ''|-*) cat <<EOT
pascal@16756 13 usage:
pascal@16756 14 $0 localpath remotehost:remotepath [-o ro -o allow_other]
pascal@16756 15 $0 -u remotehost:remotepath
pascal@16756 16 EOT
pascal@16756 17 ;;
pascal@16756 18
pascal@16756 19 *) fifo=/tmp/rsshfs-fifo$$
pascal@16756 20 shift 2
pascal@16756 21 mkfifo $fifo
pascal@16756 22 /usr/sbin/sftp-server < $fifo | \
pascal@16756 23 ssh "$rhost" sshfs -o slave ":$lpath" "$rpath" "$@" > $fifo
pascal@16756 24 rm -f $fifo
pascal@16756 25 esac