mirror of
https://github.com/stefanberger/swtpm.git
synced 2025-08-22 19:04:35 +00:00

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>
44 lines
434 B
Bash
Executable File
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 "$@"
|