| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function render_doIdentityImages { |
| |
| local EXPORTID='' |
| local EXTERNALFILES='' |
| local EXTERNALFILE='' |
| |
| |
| |
| EXPORTID='CENTOSARTWORK' |
| |
| |
| |
| for FILE in $FILES; do |
| |
| |
| render_getIdentityDefs |
| |
| |
| grep "id=\"$EXPORTID\"" $INSTANCE > /dev/null |
| if [[ $? -gt 0 ]];then |
| cli_printMessage "`eval_gettext "The export id (\\\$EXPORTID) was not found inside \\\$TEMPLATE."`" "AsErrorLine" |
| echo '----------------------------------------------------------------------' |
| continue |
| fi |
| |
| |
| |
| |
| WIDTH=$(basename $FILE) |
| if [[ $WIDTH =~ '^[0-9]+$' ]];then |
| WIDTH="--export-width=$WIDTH" |
| else |
| WIDTH='' |
| fi |
| |
| |
| |
| |
| grep "=THEME=" $INSTANCE > /dev/null |
| if [[ $? -eq 0 ]];then |
| sed -i -e "s!=THEME=!$(cli_getThemeName)!g" $INSTANCE |
| fi |
| |
| |
| |
| |
| |
| |
| EXTERNALFILES=$(egrep '(xlink:href|sodipodi:absref)="/home/centos/artwork/' $INSTANCE \ |
| | sed -r 's!^[[:space:]]+!!' \ |
| | sed -r 's!^(xlink:href|sodipodi:absref)="!!' \ |
| | sed -r 's!".*$!!' | uniq) |
| for EXTERNALFILE in $EXTERNALFILES;do |
| cli_checkFiles $EXTERNALFILE |
| done |
| |
| |
| |
| |
| inkscape $INSTANCE \ |
| --export-id=$EXPORTID $WIDTH \ |
| --export-png=$FILE.png \ |
| | sed -r -e "s!Area !`gettext "Area"`: !" \ |
| -e "s!Background RRGGBBAA:!`gettext "Background"`: RRGGBBAA!" \ |
| -e "s!Bitmap saved as:.+/(trunk|branches|tags)/!`gettext "Saved as"`: \1/!" |
| |
| |
| if [[ -a $INSTANCE ]];then |
| rm $INSTANCE |
| fi |
| |
| |
| |
| if [[ ${#ACTIONS[@]} -lt 1 ]];then |
| continue |
| fi |
| |
| |
| for ACTION in "${ACTIONS[@]}"; do |
| |
| if [[ "$ACTION" == '' ]] || [[ "$ACTION" == 'renderImage' ]];then |
| continue |
| fi |
| |
| case "$ACTION" in |
| |
| renderSyslinux ) |
| render_doIdentityImageSyslinux $FILE |
| ;; |
| |
| renderGrub ) |
| render_doIdentityImageGrub $FILE |
| ;; |
| |
| renderKSplash ) |
| render_doIdentityImageKsplash $FILE |
| ;; |
| |
| renderFormats:* ) |
| render_doIdentityImageFormats $FILE "$ACTION" |
| ;; |
| |
| renderBrands:* ) |
| render_doIdentityImageBrands "$FILE" "$ACTION" |
| ;; |
| |
| groupByFormat:* ) |
| groupByFormat "$FILE" "$ACTION" |
| ;; |
| |
| esac |
| |
| done |
| |
| echo '----------------------------------------------------------------------' |
| |
| done \ |
| | awk 'BEGIN {FS=": "} \ |
| { if ( $0 ~ /^-+$/ ) print $0; else \ |
| printf "%-15s\t%s\n", $1, $2 }' |
| |
| } |