Mercurial > geeqie.yaz
diff plugins/rotate/geeqie-rotate @ 1717:61bd3a2f633d
added possibility to use geeqie-rotate as a standalone script
author | nadvornik |
---|---|
date | Sun, 13 Sep 2009 09:55:21 +0000 |
parents | 34c71cbbbd26 |
children |
line wrap: on
line diff
--- a/plugins/rotate/geeqie-rotate Sat Sep 12 16:37:05 2009 +0000 +++ b/plugins/rotate/geeqie-rotate Sun Sep 13 09:55:21 2009 +0000 @@ -47,13 +47,23 @@ esac } +get_sidecars= +if [ "x$1" == "x-g" ] ; then + get_sidecars=yes + shift +fi + # 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 - rotate "$sidecar" - done + if [ -n "$get_sidecars" ] ; then + # 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 + rotate "$sidecar" + done + else + rotate "$file" + fi done