Created
November 21, 2011 18:36
-
-
Save buzztaiki/1383469 to your computer and use it in GitHub Desktop.
自動マウントするgvfs-ls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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