view plugins/symlink/geeqie-symlink @ 1781:95a013ade7e2

Fix bug 2917164. g_utf8_collate_key_for_filename() don't give sort order one may expect. Using g_utf8_collate_key() make things closer to many other programs output (ie. ls and gqview). Thanks to Michael pointing this out.
author zas_
date Sat, 19 Dec 2009 12:53:20 +0000
parents 3840882253fe
children
line wrap: on
line source

#!/bin/sh

# This is a helper script that symlinks grouped files
# it uses geeqie remote connection to get details about grouped files


# iterate over files on commandline
for file in "$@" ; do
    # we got only one file for each group, typically the main one
    # get the sidecars:
    geeqie -r --get-sidecars:"$file" |while read sidecar ; do
	# the main file is included in the sidecar file list, no special handling is required
	# get destination path for each sidecar file:
        geeqie -r --get-destination:"$sidecar" | if read destination ; then
            ln -s "$sidecar" "$destination"
        fi
    done
done