fixed a couple of issues in process-archive.sh...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-10-31 07:40:02 +04:00
parent 552af3d47f
commit f1f7ceb7e6
2 changed files with 28 additions and 4 deletions

View File

@ -34,7 +34,7 @@ while true ; do
;;
--common-previews)
COMMON_PREVIEWS="${2}/preview (RAW)"
COMMON_PREVIEWS="${2}"
shift
shift
;;
@ -214,18 +214,26 @@ fi
# collect previews to one location...
# XXX test!!!
if ! [ -z $COMMON_PREVIEWS ] ; then
if ! [ -z "$COMMON_PREVIEWS" ] ; then
if ! [ -e "./$COMMON_PREVIEWS" ] ; then
mkdir -p "./$COMMON_PREVIEWS"
fi
find . -type d -name 'preview (RAW)' -exec mv "{}" "./$COMMON_PREVIEWS" \;
find . -type d \
-name 'preview (RAW)' \
-print \
-exec cp -rl "{}" "./$COMMON_PREVIEWS" \;
#-exec rm -rf "./$d"
fi
# build cache...
if [ -z $SKIP_CACHE ] ; then
find . -type d -name 'preview (RAW)' -exec buildcache "{}" \;
if ! [ -z "$COMMON_PREVIEWS" ] && [ -e "./$COMMON_PREVIEWS/preview (RAW)" ] ; then
buildcache "./$COMMON_PREVIEWS/preview (RAW)"
else
find . -type d -name 'preview (RAW)' -exec buildcache "{}" \;
fi
fi

View File

@ -1620,6 +1620,22 @@ function appendMarker(){
}
// NOTE: if cmp is explicitly false then no sorting will be done.
function loadRibbonsFromPath(path, cmp, reverse){
path = path == null ? BASE_URL : path
path = normalizePath(path)
cmp = cmp == null ? imageDateCmp : cmp
DATA.ribbons = ribbonsFromFavDirs(path)
if(cmp != false){
sortImages(cmp, reverse)
} else {
reloadViewer()
}
}
/**********************************************************************
* vim:set ts=4 sw=4 spell : */