mirror of
https://github.com/AdaCore/PolyORB.git
synced 2026-02-12 13:01:15 -08:00
29 lines
429 B
Bash
Executable File
29 lines
429 B
Bash
Executable File
#!/bin/sh
|
|
if [ $# != 2 ]; then
|
|
echo "Usage: $0 <keyword file> <keyword substitution file>"
|
|
exit 0
|
|
fi
|
|
SOURCE=$1
|
|
TARGET=$2
|
|
/bin/rm -f ${TARGET}
|
|
case ${SOURCE} in
|
|
*ada*)
|
|
cat <<EOF >>${TARGET}
|
|
/--/s/@/@@/g
|
|
/--/b
|
|
EOF
|
|
;;
|
|
*idl*)
|
|
cat <<EOF >>${TARGET}
|
|
s/{/\@{/g
|
|
s/}/\@}/g
|
|
EOF
|
|
;;
|
|
esac
|
|
for k in `cat ${SOURCE}`; do
|
|
cat <<EOF >>${TARGET}
|
|
s/\([^\{\}a-zA-Z0-9_]\)${k}/\1\@b\{${k}\}/g
|
|
s/^${k}/\@b\{${k}\}/g
|
|
EOF
|
|
done
|