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
|
2007-02-04 12:37:46 +00:00
|
|
|
if [ "$i" = "stx" ]; then continue; fi
|
2007-02-03 11:54:02 +00:00
|
|
|
|
|
|
|
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
|
2007-02-04 13:00:37 +00:00
|
|
|
root="$base/ase-$VER"
|
|
|
|
target="$root/ase"
|
2007-02-03 11:54:02 +00:00
|
|
|
mkdir -p "$target/$cur"
|
|
|
|
|
|
|
|
case "$full" in
|
|
|
|
*.h|*.c|*.cc|*.cpp|*.java|*.awk|*.in)
|
2007-02-04 07:48:32 +00:00
|
|
|
"$HOME/awk" -f "$base/rel/lic.awk" -a "$target/$file" "$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
|
|
|
|
}
|
|
|
|
|
2007-02-04 12:41:21 +00:00
|
|
|
if [ ! -f ../CVS/Tag ]
|
2007-02-04 12:37:46 +00:00
|
|
|
then
|
2007-02-04 12:41:21 +00:00
|
|
|
echo "Error: ../CVS/Tag not found"
|
|
|
|
exit 1;
|
2007-02-04 12:37:46 +00:00
|
|
|
fi
|
|
|
|
|
2007-02-04 13:00:37 +00:00
|
|
|
VER=`cat ../CVS/Tag | cut -c6- | tr '[A-Z]' '[a-z]' | sed 's/_/./g`
|
2007-02-04 12:41:21 +00:00
|
|
|
|
2007-02-03 11:54:02 +00:00
|
|
|
cwd=`pwd`
|
|
|
|
cd ".."
|
|
|
|
base=`pwd`
|
2007-02-04 13:00:37 +00:00
|
|
|
|
2007-02-03 11:54:02 +00:00
|
|
|
finalize "$base" "" ""
|
2007-02-04 13:00:37 +00:00
|
|
|
|
2007-02-03 11:54:02 +00:00
|
|
|
exit 0
|