Skip to content

Instantly share code, notes, and snippets.

@buzztaiki
Created November 21, 2011 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buzztaiki/1383469 to your computer and use it in GitHub Desktop.
Save buzztaiki/1383469 to your computer and use it in GitHub Desktop.
自動マウントするgvfs-ls
#!/bin/bash
tmp=$(mktemp)
/usr/bin/gvfs-ls "$@" 2> $tmp
cat $tmp | grep -e '^Error' && \
/usr/bin/gvfs-mount $(eval "echo \${$#}") && \
/usr/bin/gvfs-ls "$@"
rm $tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment