swtpm/tests/create_certs.sh
Stefan Berger 8f0f381f95 scripting: Use #!/usr/bin/env bash rather than /bin/bash
On some systems /bin/bash does not exists but the bash is somewhere
else and can be invoked with /usr/bin/env bash.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-09-10 16:49:12 +00:00

44 lines
434 B
Bash
Executable File

#!/usr/bin/env bash
#echo $@
main() {
local typ ek dir vmid
while [ $# -ne 0 ]; do
#echo $1
case "$1" in
--type)
shift
typ="$1"
;;
--ek)
shift
ek="$1"
;;
--dir)
shift
dir="$1"
;;
--vmid)
shift
vmid="$1"
;;
--tpm2)
;;
esac
shift
done
case "$typ" in
ek)
echo -n "ek" > ${dir}/ek.cert
;;
platform)
echo -n "platform" > ${dir}/platform.cert
;;
esac
}
main "$@"