diff options
author | Rouslan Placella <rouslan@placella.com> | 2011-10-13 22:25:07 +0400 |
---|---|---|
committer | Rouslan Placella <rouslan@placella.com> | 2011-10-13 22:25:07 +0400 |
commit | 137a70e671954ed6fdb11290d6bc62b46426ba63 (patch) | |
tree | 703d0b7667478778f35866ed852a379426efd0cf /scripts | |
parent | c692607e2e3b0426fb21fea2ad7b4e97b364e04b (diff) |
Checkstyle fixes
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/generate-sprites | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/scripts/generate-sprites b/scripts/generate-sprites index 6ea9aef10c..604ffb231e 100755 --- a/scripts/generate-sprites +++ b/scripts/generate-sprites @@ -98,17 +98,10 @@ if [ -d $1/themes ]; then echo "/* RUN './scripts/generate-sprites' TO UPDATE THIS FILE */" >> $LIBRARY echo "function PMA_sprites() {" >> $LIBRARY echo " return array(" >> $LIBRARY - PADDING=0 - for f in $FILES; do - if [ ${#f} -gt $PADDING ]; then - PADDING=${#f} - fi - done - PADDING=$(($PADDING-3)) CURRENT=1 for f in $FILES; do # Add a CSS rule for each icon in the sprite - NAME=$(echo "'$f'" | sed 's/\.png//' | sed -e :a -e "s/^.\{1,$PADDING\}$/& /;ta") + NAME=$(echo "'$f'" | sed 's/\.png//') DATA=$(identify -ping $f || echo "NULL") if [ "$DATA" != "NULL" ]; then @@ -123,7 +116,11 @@ if [ -d $1/themes ]; then fi done fi - echo " $NAME => array('position' => '$CURRENT', 'width' => '$WIDTH', 'height' => '$HEIGHT')," >> $LIBRARY + echo " $NAME => array(" >> $LIBRARY + echo " 'position' => '$CURRENT'," >> $LIBRARY + echo " 'width' => '$WIDTH'," >> $LIBRARY + echo " 'height' => '$HEIGHT'" >> $LIBRARY + echo " )," >> $LIBRARY CURRENT=$(($CURRENT+1)) done echo " );" >> $LIBRARY |