qse/ase/rel/rel.sh

66 lines
999 B
Bash
Raw Normal View History

2007-02-03 11:54:02 +00:00
#!/bin/sh
finalize ()
{
base="$1"; cur="$2"; dir="$3";
if [ "$dir" = "" ]
then
cd "$base"
else
cd "$base/$dir"
fi
for i in *
do
if [ "$i" = "*" ]; then continue; fi
if [ "$i" = "CVS" ]; then continue; fi
if [ "$cur" = "" ]
then
file="$i"
full="$base/$i"
else
file="$cur/$i"
full="$base/$cur/$i"
fi
if [ -d "$full" ]
then
if [ "$dir" = "" ]
then
new="$i"
else
new="$dir/$i"
fi
finalize "$base" "$file" "$new"
base="$1"; cur="$2"; dir="$3";
elif [ -f "$full" ]
then
target="$base/xxx"
mkdir -p "$target/$cur"
case "$full" in
*.h|*.c|*.cc|*.cpp|*.java|*.awk|*.in)
2007-02-03 14:48:30 +00:00
"$base/test/awk/awk" -f "$base/rel/lic.awk" -a "$target/$file" "$full"
;;
*.man)
#"$base/test/awk/awk" -f "$base/rel/doc.awk -a "$target" "$full"
2007-02-03 11:54:02 +00:00
;;
*)
cp -f "$full" "$target/$file"
;;
esac
#echo "$full,$base,$file: $base/xxx/$file [OK]"
fi
done
}
cwd=`pwd`
cd ".."
base=`pwd`
finalize "$base" "" ""
exit 0