Blame p11-kit/gen-virtual-fixed.sh
|
Packit Service |
3749ba |
#!/bin/sh
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
target="$1"
|
|
Packit Service |
3749ba |
closures="$2"
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
rm -f $target-t $target && \
|
|
Packit Service |
3749ba |
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
|
Packit Service |
3749ba |
echo; \
|
|
Packit Service |
3749ba |
counter=0; \
|
|
Packit Service |
3749ba |
while test $counter -lt $closures; do \
|
|
Packit Service |
3749ba |
echo "P11_VIRTUAL_FIXED_FUNCTIONS($counter)"; \
|
|
Packit Service |
3749ba |
counter=`expr $counter + 1`; \
|
|
Packit Service |
3749ba |
done; \
|
|
Packit Service |
3749ba |
echo; \
|
|
Packit Service |
3749ba |
echo "CK_FUNCTION_LIST p11_virtual_fixed[P11_VIRTUAL_MAX_FIXED] = {"; \
|
|
Packit Service |
3749ba |
counter=0; \
|
|
Packit Service |
3749ba |
while test $counter -lt $closures; do \
|
|
Packit Service |
3749ba |
echo " P11_VIRTUAL_FIXED_INITIALIZER($counter),"; \
|
|
Packit Service |
3749ba |
counter=`expr $counter + 1`; \
|
|
Packit Service |
3749ba |
done; \
|
|
Packit Service |
3749ba |
echo '};'; \
|
|
Packit Service |
3749ba |
echo; \
|
|
Packit Service |
3749ba |
counter=0; \
|
|
Packit Service |
3749ba |
while test $counter -lt $closures; do \
|
|
Packit Service |
3749ba |
echo "P11_VIRTUAL_FIXED_GET_FUNCTION_LIST($counter)"; \
|
|
Packit Service |
3749ba |
counter=`expr $counter + 1`; \
|
|
Packit Service |
3749ba |
done; \
|
|
Packit Service |
3749ba |
} > $target-t && mv -f $target-t $target
|