xref: /freebsd/contrib/libfido2/tools/fido2-attach.sh (revision 2ccfa855b2fc331819953e3de1b1c15ce5b95a7e)
10afa8e06SEd Maste#!/bin/sh
20afa8e06SEd Maste
30afa8e06SEd Maste# Copyright (c) 2020 Yubico AB. All rights reserved.
40afa8e06SEd Maste# Use of this source code is governed by a BSD-style
50afa8e06SEd Maste# license that can be found in the LICENSE file.
6*2ccfa855SEd Maste# SPDX-License-Identifier: BSD-2-Clause
70afa8e06SEd Maste
80afa8e06SEd MasteDEV=""
90afa8e06SEd Maste
100afa8e06SEd Mastewhile [ -z "${DEV}" ]; do
110afa8e06SEd Maste	sleep .5
120afa8e06SEd Maste	DEV="$(fido2-token -L | sed 's/^\(.*\): .*$/\1/;q')"
130afa8e06SEd Mastedone
140afa8e06SEd Maste
150afa8e06SEd Masteprintf '%s\n' "${DEV}"
16