From 379ebf28e67590c4148bba27c2f48ed43ea8bd83 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Oct 19 2010 19:35:57 +0000 Subject: Remove trailing new line from options definition inside render_doIdentityImageSyslinux.sh and render_doIdentityImageGrub.sh --- diff --git a/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/Anaconda/Prompt/render.conf.sh b/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/Anaconda/Prompt/render.conf.sh index 8192c00..c5db8b8 100755 --- a/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/Anaconda/Prompt/render.conf.sh +++ b/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/Anaconda/Prompt/render.conf.sh @@ -29,7 +29,7 @@ function render_loadConfig { # Define rendering actions. ACTIONS[0]='BASE:renderImage' ACTIONS[1]='POST:renderSyslinux:' - ACTIONS[2]='POST:renderSyslinux: -floyd' + ACTIONS[2]='POST:renderSyslinux:-floyd' # Define matching list. MATCHINGLIST='' diff --git a/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/BootUp/GRUB/render.conf.sh b/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/BootUp/GRUB/render.conf.sh index 84a658d..43b5270 100755 --- a/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/BootUp/GRUB/render.conf.sh +++ b/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/BootUp/GRUB/render.conf.sh @@ -29,7 +29,7 @@ function render_loadConfig { # Define rendering actions. ACTIONS[0]='BASE:renderImage' ACTIONS[1]='POST:renderGrub:' - ACTIONS[2]='POST:renderGrub: -floyd' + ACTIONS[2]='POST:renderGrub:-floyd' # Define matching list. #MATCHINGLIST='' diff --git a/Scripts/Bash/Functions/Render/render_doIdentityImageGrub.sh b/Scripts/Bash/Functions/Render/render_doIdentityImageGrub.sh index 2f63af8..1748114 100644 --- a/Scripts/Bash/Functions/Render/render_doIdentityImageGrub.sh +++ b/Scripts/Bash/Functions/Render/render_doIdentityImageGrub.sh @@ -37,7 +37,7 @@ function render_doIdentityImageGrub { # configuration script. These options are applied to pnmremap when # doing color reduction, so any option available for pnmremap # command can be passed to renderSyslinux functionality. - OPTIONS=$(echo "$ACTION" | cut -d: -f2-) + OPTIONS=$(echo -n "$ACTION" | cut -d: -f2-) # Re-define 16 colors images default file name prefix using # options as reference. This is useful to differenciate final @@ -89,7 +89,7 @@ function render_doIdentityImageGrub { # Reduce colors as specified in ppm palette of colors. cli_printMessage "${FILE}${PREFIX}.ppm" "AsSavedAsLine" - pnmremap -verbose -mapfile=$PALETTE_PPM "$OPTIONS" \ + pnmremap -verbose -mapfile=$PALETTE_PPM $OPTIONS \ < $FILE.pnm \ 2>>$FILE.log \ > ${FILE}${PREFIX}.ppm diff --git a/Scripts/Bash/Functions/Render/render_doIdentityImageSyslinux.sh b/Scripts/Bash/Functions/Render/render_doIdentityImageSyslinux.sh index 06ccd2e..99910f9 100755 --- a/Scripts/Bash/Functions/Render/render_doIdentityImageSyslinux.sh +++ b/Scripts/Bash/Functions/Render/render_doIdentityImageSyslinux.sh @@ -37,15 +37,7 @@ function render_doIdentityImageSyslinux { # configuration script. These options are applied to pnmremap when # doing color reduction, so any option available for pnmremap # command can be passed to renderSyslinux functionality. - OPTIONS=$(echo "$ACTION" | cut -d: -f2-) - - # Re-define 16 colors images default file name prefix using - # options as reference. This is useful to differenciate final - # files produced using Floyd-Steinberg dithering and files which - # do not. - if [[ "$OPTIONS" =~ '-floyd' ]];then - PREFIX="${PREFIX}-floyd" - fi + OPTIONS=$(echo -n "$ACTION" | cut -d: -f2-) # Check options passed to action. This is required in order to # aviod using options used already in this script. For example @@ -59,7 +51,15 @@ function render_doIdentityImageSyslinux { fi done - # Define Motif's palette location. We do this relatively. + # Re-define 16 colors images default file name prefix using + # options as reference. This is useful to differenciate final + # files produced using Floyd-Steinberg dithering and final files + # which are not. + if [[ "$OPTIONS" =~ '-floyd' ]];then + PREFIX="${PREFIX}-floyd" + fi + + # Define absolute location to motif's palette of colors. local PALETTES=/home/centos/artwork/trunk/Identity/Themes/Motifs/$(cli_getThemeName)/Colors # Define the Netpbm color palette used when reducing colors. This @@ -96,7 +96,7 @@ function render_doIdentityImageSyslinux { # enforce the color position in the image index and the # Floyd-Steinberg dithering in order to improve color reduction. cli_printMessage "$FILE${PREFIX}.pnm" "AsSavedAsLine" - pnmremap -verbose -mapfile=$PALETTE_PPM "$OPTIONS" \ + pnmremap -verbose -mapfile=$PALETTE_PPM $OPTIONS \ < $FILE.pnm \ 2>>$FILE.log > $FILE${PREFIX}.pnm