summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ef3db06)
Adds a progress type meter while creating the icons, processes (up to) 4 icons
at a time using xargs.
git-archimport-id: arch@sommitrealweird.co.uk--2005-desktop/bpgallery--mainline--0.9.2--patch-4
fi
if [[ -z $CONVERTTOOL ]]; then
fi
if [[ -z $CONVERTTOOL ]]; then
- CONVERTTOOL="/usr/bin/convert"
fi
if [[ -z $FINDCOMMAND ]]; then
fi
if [[ -z $FINDCOMMAND ]]; then
- FINDCOMMAND=/usr/bin/find
fi
if [[ -z $XARGSCOMMAND ]]; then
fi
if [[ -z $XARGSCOMMAND ]]; then
- XARGSCOMMAND=/usr/bin/xargs
fi
if [[ -z $ECHOCOMMAND ]]; then
fi
if [[ -z $ECHOCOMMAND ]]; then
fi
if [[ -z $SORTCOMMAND ]]; then
fi
if [[ -z $SORTCOMMAND ]]; then
- SORTCOMMAND=/usr/bin/sort
fi
if [[ -z $IDENTIFYCOMMAND ]]; then
fi
if [[ -z $IDENTIFYCOMMAND ]]; then
- IDENTIFYCOMMAND=/usr/bin/identify
+ IDENTIFYCOMMAND=identify
fi
if [[ -z $HEADCOMMAND ]]; then
fi
if [[ -z $HEADCOMMAND ]]; then
- HEADCOMMAND=/usr/bin/head
fi
if [[ -z $WIDTH ]]; then
fi
if [[ -z $WIDTH ]]; then
IMAGEEXTENSIONS="jpeg jpg gif png";
fi
IMAGEEXTENSIONS="jpeg jpg gif png";
fi
+if [[ -z $WCCOMMAND ]]; then
+ WCCOMMAND="wc -l"
+fi
+
FINDIMAGESOPTIONS=""
for imageext in $IMAGEEXTENSIONS; do
FINDIMAGESOPTIONS=""
for imageext in $IMAGEEXTENSIONS; do
-$FINDCOMMAND . $FINDIMAGESOPTIONS | $XARGSCOMMAND -0 --replace $CONVERTTOOL -resize $WIDTH '{}' 'icons/{}'
+totalimages=$($FINDCOMMAND . $FINDIMAGESOPTIONS | $XARGSCOMMAND -0 --replace echo {} | $WCCOMMAND);
+currentimage=0
+
+$FINDCOMMAND . $FINDIMAGESOPTIONS | $XARGSCOMMAND -0 --verbose --max-procs=4 --replace $CONVERTTOOL -resize $WIDTH '{}' 'icons/{}' 2>&1 | while read throwout; do echo done: $currentimage/$totalimages images; currentimage=$((currentimage+1)); done
+
+echo done: $totalimages/$totalimages images
cat <<END > index.html
<?xml version="1.0"?>
cat <<END > index.html
<?xml version="1.0"?>