From: <bms...@us...> - 2006-07-09 18:48:19
|
Revision: 2342 Author: bmsleight Date: 2006-07-09 11:48:12 -0700 (Sun, 09 Jul 2006) ViewCVS: http://svn.sourceforge.net/morphix/?rev=2342&view=rev Log Message: ----------- * morphix-rebrand on a iso that has already been rebranded Modified Paths: -------------- trunk/morph-scripts/debian/changelog trunk/morph-scripts/morphix-rebrand.sh Modified: trunk/morph-scripts/debian/changelog =================================================================== --- trunk/morph-scripts/debian/changelog 2006-07-06 22:34:08 UTC (rev 2341) +++ trunk/morph-scripts/debian/changelog 2006-07-09 18:48:12 UTC (rev 2342) @@ -1,3 +1,9 @@ +morph-scripts (0.2-28) unstable; urgency=low + + * morphix-rebrand on a iso that has already been rebranded + + -- bmsleight <bms...@ba...> Sun, 09 Jul 2006 19:45:00 +0100 + morph-scripts (0.2-27) unstable; urgency=low * morphmini <packages> <other> Modified: trunk/morph-scripts/morphix-rebrand.sh =================================================================== --- trunk/morph-scripts/morphix-rebrand.sh 2006-07-06 22:34:08 UTC (rev 2341) +++ trunk/morph-scripts/morphix-rebrand.sh 2006-07-09 18:48:12 UTC (rev 2342) @@ -22,9 +22,19 @@ mkdir -p $OLD_IMAGE_DIR TMP=$(basename "${GRAPHIC}") TITLE=${TMP%.*} - TITLE=$(echo "$TITLE" | tr -cd '[:alnum:]') +# TITLE=$(echo "$TITLE" | tr -cd '[:alnum:]') TITLE_LC=$(echo "$TITLE" | tr A-Z a-z) - echo "New title: $TITLE $TITLE_LC" + TITLE_UC=$(echo "$TITLE" | tr a-z A-Z) + echo "New title: $TITLE $TITLE_LC $TITLE_UC" + INTERIM_TITLE="AFC_Wimbledon_Is_A_Football_team" + if [ "$TITLE" = "INTERIM_TITLE" ]; then + echo "Please do not use $INTERIM_TITLE as a title for a LiveCD" + echo + echo " This is a special reserved name. Please use another title. " + exit + fi + + } full_path () @@ -52,7 +62,6 @@ OLD_TITLE=$(grep -e "title" -m 1 $NEW_IMAGE_DIR/boot/grub/menu.lst | sed s/title\ //g) LOWERCASE_OT=$(echo $OLD_TITLE | tr A-Z a-z) UPPERCASE_OT=$(echo $OLD_TITLE | tr a-z A-Z) - echo "Old name " $OLD_TITLE $LOWERCASE_OT $UPPERCASE_OT } @@ -71,7 +80,8 @@ mv $TMP_FILE $TMP_GRUB_FILE done #BOOT_IMAGE -mv $NEW_IMAGE_DIR/base/$LOWERCASE_OT $NEW_IMAGE_DIR/base/$TITLE +mv $NEW_IMAGE_DIR/base/$LOWERCASE_OT $NEW_IMAGE_DIR/base/$TITLE 2>/dev/null +mv $NEW_IMAGE_DIR/base/$OLD_TITLE $NEW_IMAGE_DIR/base/$TITLE 2>/dev/null #Remove old Username for TMP_GRUB_FILE in $NEW_IMAGE_DIR/boot/grub/*.lst @@ -108,7 +118,7 @@ convert -size 160x215 xc:darkblue $TMP_DIR/background_br.png convert -size 434x341 xc:darkblue $TMP_DIR/grubmenu.png convert $GRAPHIC -resize 160x126 $TMP_DIR/resize.png -convert -background none -fill white -gravity North -pointsize 24 -size 148x183 caption:"Welcome to $TITLE LiveCD" $TMP_DIR/title.png +convert -background none -fill white -gravity North -pointsize 16 -size 148x183 caption:"Welcome to $TITLE" $TMP_DIR/title.png convert -page 640x503+172+34 $TMP_DIR/grubmenu.png -page 640x503+6+34 $TMP_DIR/resize.png -page 640x503+12+166 $TMP_DIR/title.png -page 640x503+6+160 $TMP_DIR/background_br.png -page 640x503+0,0 $TMP_DIR/background_tr.png -background none -compose DstOver -flatten $TMP_DIR/grub.pcx convert $TMP_DIR/grub.pcx -resize 640x503! -colors 14 -depth 8 $TMP_DIR/gfxboot-grub-0.1/background.pcx #sed "s/$OLD_TITLE/$TITLE/g" $TMP_DIR/gfxboot-grub-0.1/help-boot.en.html >$TMP_FILE @@ -126,10 +136,11 @@ mount $TMP_DIR/miniroot $TMP_DIR/lxrc -o loop -t ext2 sed "s/DERIVATE=.*/DERIVATE=\"$TITLE\"/g" $TMP_DIR/lxrc/linuxrc >$TMP_FILE mv $TMP_FILE $TMP_DIR/lxrc/linuxrc -sed "s/$UPPERCASE_OT/$TITLE/g" $TMP_DIR/lxrc/linuxrc >$TMP_FILE -sed "s/$LOWERCASE_OT/$TITLE/g" $TMP_FILE >$TMP_DIR/lxrc/linuxrc -sed "s/$OLD_TITLE/$TITLE/g" $TMP_DIR/lxrc/linuxrc >$TMP_FILE -mv $TMP_FILE $TMP_DIR/lxrc/linuxrc +sed "s/$UPPERCASE_OT/$INTERIM_TITLE/g" $TMP_DIR/lxrc/linuxrc >$TMP_FILE +sed "s/$LOWERCASE_OT/$INTERIM_TITLE/g" $TMP_FILE >$TMP_DIR/lxrc/linuxrc +sed "s/$OLD_TITLE/$INTERIM_TITLE/g" $TMP_DIR/lxrc/linuxrc >$TMP_FILE +sed "s/$INTERIM_TITLE/$TITLE/g" $TMP_FILE >$TMP_DIR/lxrc/linuxrc +#mv $TMP_FILE $TMP_DIR/lxrc/linuxrc chmod a+x $TMP_DIR/lxrc/linuxrc ln -s /${OLD_TITLE}CD $TMP_DIR/lxrc/${TITLE}CD convert $GRAPHIC -quality 75 -resize 1024x768 -size 1024x768 xc:white +swap -gravity center -composite $TMP_DIR/silent-1024x768.jpg @@ -170,6 +181,7 @@ echo " This script Re-brands a Morphix CD image using the graphic file " echo " Any Graphic file will do. Rebrand.png, Rebrand.jpg or Rebrand.gif" echo " The name of the graphics file is important as the script takes Rebrand as the new title for the LiveCd." + echo " The name should not contain non-alpha-numeric characters" echo " Need to have be able to run the mount command, i.e. must be root" exit fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |