[Lunar-commits] CVS: brutus/lunar-tools/grimoire morph,NONE,1.1

Auke Kok sofar at lunar-linux.org
Sat Jan 31 21:55:40 GMT 2004


Update of /var/cvs/lunar/brutus/lunar-tools/grimoire
In directory dbguin.lunar-linux.org:/tmp/cvs-serv27952

Added Files:
	morph 
Log Message:
Moving things to a logical place


--- NEW FILE: morph ---
#!/bin/sh
###########################################
#morph                                    #
#                                         #
#usage: morph <full_path_to_grimoire>     #
#Created by Kenny Mann [Nazadus]          #
#With *MUCH* help from lurch_             #
#Notes:                                   #
#Tabs are deleted for some reason,        #
# it appears that echo does not           #
# display them correctly.
#
# Hacked by Xoritor [jason at xorit.net]
#
# does not require full path 
#   useage: morph <dir> 
# multiple passes for different fixes
# 

echo Starting morph pass 1...

# Morph each occurance of SPELL to MODULE

FILES=`grep -r -l SPELL $1`
for i in $FILES; do
  echo Pass 1 Editing $i
  cp $i $i.BAK
  perl -pi -e 's/SPELL/MODULE/gi' $i
  chmod +x $i
  rm $i.BAK
done

echo Pass 1 changed all references of SPELL to MODULE.
echo Moving on to pass 2 ...

# Morph each occurance of spell_ to module_

FILES=`grep -r -l spell_ $1`
for i in $FILES; do
  echo Pass 2 Editing $i
  cp $i $i.BAK
  perl -pi -e 's/spell_/module_/gi' $i
  chmod +x $i
  rm $i.BAK
done

echo Pass 2 changed all references of spell_ to module_ .
echo moving on to pass 3...

# Morph each occurance of sorcery to lunar.
FILES=`grep -r -l sorcery $1`
for i in $FILES; do
  echo Pass 2 Editing $i
  cp $i $i.BAK  
  perl -pi -e 's/sorcery/lunar/gi' $i
  chmod +x $i
  rm $i.BAK
done

echo Pass 3 changed all references of sorcery to lunar.
echo Passes 1, 2, and 3 complete, everything morphed.




More information about the Lunar-commits mailing list