Hello everybody,

I just wanted to polish the script and make it run-able under linux, too.

Therefore I included the gvfs-mount command and separated the mounting 
processes by platform.
Somehow I got stuck; I think I'm totally not used to bash-scripting :(

The problem is, that .gvfs mounts it's volumes into "~/.gvfs/share on server" 
or even worse when localized "~/.gvfs/share auf server".
This means that the mountpoint is barely predictable and needs to be looked up 
e.g. by the means of:
        gvfs-mount -l | grep smb://user@host/share/
This will produce:
        Mount(0): user on server -> smb://user@host/share/
or in case of WebDAV
        Mount(0): WebDAV as user on my.tld -> 
davs://[email protected]/cloud/files/webdav.php

It's ridiculous but I'm not able to parse those lines!

The routine itself looks somewhat like this:

                gvfs-mount ${SAMBA_PROTOCO}L${SAMBA_PATH}                       
                        #works
                cmd="gvfs-mount -l | grep "${SAMBA_PROTOCOL}${SAMBA_PATH}"      
                #works
                DAVMOUNT=`eval $cmd`                                            
                                                        #works
                                        
                #cmd= "echo $DAVMOUNT | awk  '{ print \$2 \$3 \$4}'"            
                                #this blows my mind!
                #...
The problem is, that I'm simply unable to embed the correct awk statement into 
an veal and assign the result to a variable.
Using the terminal the following statement works:
                echo "Mount(0): user on server -> smb://user@host/share/" | awk 
'{ print $2" "$3" "$4}'

Anyone out there with major bash/awk/sed/grep/egrep-skills who could help me 
out?

Kind Regards,
Dorian


Attachment: syncOwncloud.sh
Description: Binary data

_______________________________________________
Owncloud mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/owncloud

Reply via email to