-#!/bin/bash
+#!/bin/sh
#Save created files in this subdirectory:
dir="created"
+set -ex
+
#Create subdirectory if not already existing
if [ ! -d "$dir" ]
then
mkdir "$dir"
fi
+#Guess how `rename` program from `util-linux` package is named :face_palm:
+if which rename.ul; then
+ RENAME=rename.ul # debian, ubuntu
+else
+ RENAME=rename # arch, gentoo, fedora
+fi
+
#Method to render single Blender scene
render_blendscene()
{
- blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
- rename "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
+ blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
+ $RENAME "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
}
#Method to create all icons of the specified color
create_colorversion()
{
#Export flagcontent from svg
- inkscape -f "flagcontent_${colorversion}.svg" -e "flagcontent.png"
+ inkscape "flagcontent_${colorversion}.svg" -o "flagcontent.png"
#Render the Blender scenes
blendfile="flags"
convert "notify_color_taken.tga" -filter Cubic -resize 192x96 "notify_temp.tga"
#Add white border to all .tga images of this color
- gimp -d -f -i \
+ gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(addborder "flag_color*.tga" 255 255 255 24 3 9 1 3)' \
-b '(addborder "notify_color*.tga" 255 255 255 16 2 6 1 3)' \
-b '(gimp-quit 0)'
composite -gravity Center "notify_shield.png" "notify_color_shielded.tga" "notify_color_shielded.tga"
#Rename to color version
- rename "color" "$colorversion" *".tga"
+ $RENAME "color" "$colorversion" *".tga"
cd ..
}
#Export all neutral png images from svg files
-inkscape -f "flagcontent_carrying.svg" -e "flagcontent_carrying.png"
-inkscape -f "flag_shield.svg" -e "${dir}/flag_shield.png"
-inkscape -f "notify_shield.svg" -e "${dir}/notify_shield.png"
+inkscape "flagcontent_carrying.svg" -o "flagcontent_carrying.png"
+inkscape "flag_shield.svg" -o "${dir}/flag_shield.png"
+inkscape "notify_shield.svg" -o "${dir}/notify_shield.png"
#Create base images (colorize nyx.png)
convert "nyx.png" -fill "#004fff" -tint 75 "${dir}/base_blue.png"
convert "nyx.png" -fill "#ff0000" -tint 75 "${dir}/base_red.png"
cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(addborder "base*.png" 255 255 255 0 1 3 1 2)' \
-b '(gimp-quit 0)'
cd ..
rm *"temp.tga"
#RLE compress tga images
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(all2tga "*.tga" 1)' \
-b '(gimp-quit 0)'
-#!/bin/bash
+#!/bin/sh
#Save created files in this subdirectory:
dir="created"
+set -ex
+
#Create subdirectory, if not already existing
if [ ! -d "$dir" ]
then
#Copy images to subdirectory, add white border
cp *".tga" "$dir"
cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(addborder "*.tga" 255 255 255 24 3 9 1 3)' \
-b '(all2tga "*.tga" 1)' \
-b '(gimp-quit 0)'
-#!/bin/bash
+#!/bin/sh
#Save created files in this subdirectory:
dir="created"
+set -ex
+
#Create subdirectory, if not already existing
if [ ! -d "$dir" ]
then
#Copy images to subdirectory, add white border
cp *".tga" "$dir"
cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(addborder "*.tga" 255 255 255 16 2 6 1 3)' \
-b '(all2tga "*.tga" 1)' \
-b '(gimp-quit 0)'
-#!/bin/bash
+#!/bin/sh
#Save created files in this subdirectory:
dir="created"
+set -ex
+
#Create subdirectory if not already existing
if [ ! -d "$dir" ]
then
mkdir "$dir"
fi
+#Guess how `rename` program from `util-linux` package is named :face_palm:
+if which rename.ul; then
+ RENAME=rename.ul # debian, ubuntu
+else
+ RENAME=rename # arch, gentoo, fedora
+fi
+
#Export png from all svg files
for f in *".svg"
do
- inkscape -f "$f" -e "`basename $f .svg`.png"
+ inkscape "$f" -o "`basename $f .svg`.png"
done
#Method to render single Blender scene
render_blendscene()
{
- blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
- rename "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
+ blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
+ $RENAME "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
}
#Render the Blender scenes
#RLE compress tga files
cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(all2tga "*.tga" 1)' \
-b '(gimp-quit 0)'
-#!/bin/bash
+#!/bin/sh
#Save created files in this subdirectory:
dir="created"
+set -ex
+
#Create subdirectory, if not already existing
if [ ! -d "$dir" ]
then
#Copy images to subdirectory, add white border
cp *".tga" "$dir"
cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(addborder "*.tga" 255 255 255 24 3 9 1 3)' \
-b '(all2tga "*.tga" 1)' \
-b '(gimp-quit 0)'
-#!/bin/bash
+#!/bin/sh
#Save created files in this subdirectory:
dir="created"
+set -ex
+
#Uses this font:
font="DejaVu-Sans-Bold"
mkdir "$dir"
fi
+#Guess how `rename` program from `util-linux` package is named :face_palm:
+if which rename.ul; then
+ RENAME=rename.ul # debian, ubuntu
+else
+ RENAME=rename # arch, gentoo, fedora
+fi
+
#Method to render single Blender scene
render_blendscene()
{
- blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
- rename "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
+ blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
+ $RENAME "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
}
#Render the Blender scenes
render_blendscene
#Export png from svg, render notify_telefrag
-inkscape -f "crosshair.svg" -e "crosshair.png"
+inkscape "crosshair.svg" -o "crosshair.png"
blendscene="notify_telefrag"
render_blendscene
rm "crosshair.png"
#Add white border to all tga images
cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(addborder "*.tga" 255 255 255 16 2 6 1 2)' \
-b '(gimp-quit 0)'
#RLE compress tga files
cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(all2tga "*.tga" 1)' \
-b '(gimp-quit 0)'
-#!/bin/bash
+#!/bin/sh
#Save created files in this subdirectory:
dir="created"
+set -ex
+
#Create subdirectory if not already existing
if [ ! -d "$dir" ]
then
mkdir "$dir"
fi
+#Guess how `rename` program from `util-linux` package is named :face_palm:
+if which rename.ul; then
+ RENAME=rename.ul # debian, ubuntu
+else
+ RENAME=rename # arch, gentoo, fedora
+fi
+
#Method to render single Blender scene
render_blendscene()
{
- blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
- rename "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
+ blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
+ $RENAME "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
}
#Render the Blender blendscenes
#Add white border and RLE compress tga files
cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(addborder "*.tga" 255 255 255 24 3 9 0 2)' \
-b '(all2tga "*.tga" 1)' \
-b '(gimp-quit 0)'
#For compatibility with current HUD:
#Copy and rename newrank icons
cp "race_newrank.tga" "race_newrankyellow.tga"
-rename "newrank" "newrankgreen" "race_newrank.tga"
+$RENAME "newrank" "newrankgreen" "race_newrank.tga"
-#!/bin/bash
+#!/bin/sh
#Save created files in this subdirectory:
dir="created"
+set -ex
+
#Create subdirectory if not already existing
if [ ! -d "$dir" ]
then
mkdir "$dir"
fi
+#Guess how `rename` program from `util-linux` package is named :face_palm:
+if which rename.ul; then
+ RENAME=rename.ul # debian, ubuntu
+else
+ RENAME=rename # arch, gentoo, fedora
+fi
+
#Method to render single Blender scene
render_blendscene()
{
- blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
- rename "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
+ blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
+ $RENAME "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
}
#Render the Blender scenes
#Edit voteprogress_back and RLE compress tga files
cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(dbca "voteprogress_back.tga" 1 127 0 0.0)' \
-b '(dbca "voteprogress_back.tga" 0 127 0 0.0)' \
-b '(addborder "voteprogress_back.tga" 255 255 255 16 2 6 0 2)' \
-#!/bin/bash
+#!/bin/sh
#Save created files in this subdirectory:
dir="created"
+set -ex
+
#Create subdirectory, if not already existing
if [ ! -d "$dir" ]
then
#Copy images to subdirectory, add white border
cp *".tga" "$dir"
cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(dbca "*.tga" 0 15 7 0.0)' \
-b '(addborder "*.tga" 255 255 255 16 2 6 1 3)' \
-b '(all2tga "*.tga" 1)' \
-#!/bin/bash
+#!/bin/sh
#Save created files in this subdirectory:
dir="created"
+set -ex
+
#Create subdirectory if not already existing
if [ ! -d "$dir" ]
then
#Export png from svg files (to subdirectory)
for f in *".svg"
do
- inkscape -f "$f" -e "${dir}/`basename $f .svg`.png"
+ inkscape "$f" -o "${dir}/`basename $f .svg`.png"
done
#Convert from png to tga (RLE compressed), remove png
cd "$dir"
-gimp -d -f -i -b '(all2tga "*.png" 1)' -b '(gimp-quit 0)'
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
+ -b '(all2tga "*.png" 1)' \
+ -b '(gimp-quit 0)'
rm *".png"
-#!/bin/bash
+#!/bin/sh
#Save created files in this subdirectory:
dir="created"
+set -ex
+
#Create subdirectory if not already existing
if [ ! -d "$dir" ]
then
#Export png from svg files (to subdirectory)
for f in *".svg"
do
- inkscape -f "$f" -d 90 -e "${dir}/`basename $f .svg`.png"
+ inkscape "$f" -d 90 -o "${dir}/`basename $f .svg`.png"
done
#Create bigbuttons
for f in "bigbutton"*".svg"
do
- inkscape -f "$f" -d 180 -e "${dir}/`basename $f .svg`.png"
+ inkscape "$f" -d 180 -o "${dir}/`basename $f .svg`.png"
done
#Copy identical images
cp crosshairbutton_f.png colorbutton_f.png
#Edit and convert files
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(dbca "*gray*" 1 0 0 0.0)' \
-b '(dbca "*_d*" 0 0 0 50.0)' \
-b '(all2tga "*.png" 1)' \
convert the final images from various sourcefiles.
They use Inkscape, Gimp, Blender and ImageMagick, and require the provided
-Gimp scripts (gimp_files/*.scm) to be present in ~/.gimp*/scripts/.
+Gimp scripts (gimp_files/*.scm) to be present in ~/.config/GIMP/*.*/scripts/
==========================
Foreign Sourcefiles
-#!/bin/bash
+#!/bin/sh
#Save created files in this subdirectory:
dir="created"
+set -ex
+
#Create subdirectory if not already existing
if [ ! -d "$dir" ]
then
#Export png from svg files (to subdirectory)
for f in *".svg"
do
- inkscape -f "$f" -d 90 -e "${dir}/`basename $f .svg`.png"
+ inkscape "$f" -d 90 -o "${dir}/`basename $f .svg`.png"
done
#Cconvert files
cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
-b '(all2tga "*.png" 1)' \
-b '(gimp-quit 0)'