1 1.1 christos #!/bin/sh 2 1.1 christos 3 1.1 christos BUILD=../../openssl-3.0.8 4 1.1 christos 5 1.1 christos DIRS=$(cd ${BUILD}/crypto/ && ls -d1 */. | sed -e 's,/\.,,g') 6 1.1 christos 7 1.1 christos extract() { 8 1.1 christos local c 9 1.1 christos if [ $1 = "crypto" ] 10 1.1 christos then 11 1.1 christos c= 12 1.1 christos else 13 1.1 christos c=$1 14 1.1 christos fi 15 1.1 christos ls -1 ${BUILD}/crypto/$c/libcrypto-shlib-*.d | sed -e 's/.*-shlib-//' -e 's/\.d/.c \\/' 16 1.1 christos } 17 1.1 christos 18 1.1 christos for d in ${DIRS} crypto; do 19 1.1 christos proto=$d 20 1.1 christos PROTO=$(echo $d | tr '[a-z]' '[A-Z]') 21 1.1 christos extract $proto > $proto.out 22 1.1 christos sed -e "s/@proto@/$proto/g" -e "s/@PROTO@/$PROTO/g" -e "/@SRCS@/ { 23 1.1 christos r $proto.out 24 1.1 christos d 25 1.1 christos }" PROTO.in > $proto.inc 26 1.1 christos done 27