PageRenderTime 20ms CodeModel.GetById 11ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/src/canvas/gen.sh

http://ftk.googlecode.com/
Shell | 26 lines | 21 code | 4 blank | 1 comment | 3 complexity | bdae8597b953712c2e37d92da785ec94 MD5 | raw file
 1#!/bin/bash
 2name=$1
 3up_name=$2
 4
 5if [ "$up_name" == "" ]
 6then
 7	echo "$0 name upname"
 8	exit 0
 9fi
10
11rm -rf $name
12cp -rf dummy $name 
13
14echo ":%s/dummy/$name/g" >s
15echo ":%s/DUMMY/$up_name/g" >>s
16echo ":wq" >>s
17
18cd $name
19for f in *.*;
20do
21	echo vim -s ../s $f
22	vim -s ../s $f
23	new_file=`echo $f|sed -e "s/dummy/${name}/g"`
24	echo mv -f $f $new_file
25	mv -f $f $new_file
26done