view plugins/import/geeqie-import @ 1772:9f3b7a089caf

check gtk_clutter_init return value https://sourceforge.net/tracker/index.php?func=detail&aid=2899866&group_id=222125&atid=1054680
author nadvornik
date Sat, 21 Nov 2009 20:08:51 +0000
parents a15dc91173b4
children
line wrap: on
line source

#!/bin/sh

case "$1" in
	gqview) 
	    srcdir=$HOME/.gqview/metadata
	    ;;
	geeqie-1-alpha) 
	    srcdir=$HOME/.geeqie/metadata
	    ;;
	*)
	    echo Unknown argument $1
	    exit 1
	    ;;
esac

destdir=$HOME/.local/share/geeqie/metadata

if [ ! -d $HOME/.local/share/geeqie ] ; then
    echo \"$HOME/.local/share/geeqie\" does not exist
    exit 1
fi

for ext in .meta .gq.xmp ; do
    find "$srcdir" -type f -name "*$ext" -print | while read src ; do
        img="${src#$srcdir}"
        img="${img%$ext}"
        dest="$destdir$img$ext"
        if [ -f "$img" -a ! -f "$dest" ] ; then
            mkdir -p "${dest%/*}"
            cp -pr "$src" "$dest"
            echo Importing $ext metadata for \"$img\"
        fi
    done
done