#!/bin/bash dir=${pwd} name=$1 subdir=$2 if [[ $2 = "" ]] ; then $2="." fi echo "renaming files in ./${2}/ to ${1}_XX.jpg" cd $2 cp 0001.jpg "${1}_BK.jpg" cp 0002.jpg "${1}_LF.jpg" cp 0003.jpg "${1}_FR.jpg" cp 0004.jpg "${1}_RT.jpg" cp 0005.jpg "${1}_UP.jpg" cp 0006.jpg "${1}_DN.jpg" cd $dir echo -e "creating material script:\n" echo -e "material Orxonox/${1}\n{" echo -e "\ttechnique\n\t{" echo -e "\t\tpass\n\t\t{" echo -e "\t\t\tlighting off" echo -e "\t\t\tdepth_write off" echo -e "\t\t\ttexture_unit\n\t\t\t{" echo -e "\t\t\t\tcubic_texture ${1}.jpg separateUV" echo -e "\t\t\t\ttex_address_mode clamp" echo -e "\t\t\t}\n\t\t}\n\t}\n}"