#! /bin/sh# SPDX-License-Identifier: LGPL-2.1-or-laterset -eufd=$HOME/.sshp=${2:-authorized_keys}f=$d/$pif ! test -f "$f"; then# shellcheck disable=SC2174 # yes, we know that -m only applies to the deepest directorymkdir -m 700 -p "$d"touch "$f"chmod 600 "$f"fiwhile read l; doif [ "$l" = "$1" ]; thenexit 0fidone <"$f"# Add newline if necessary! test -s "$f" || tail -c1 < "$f" | read -r _ || echo >> "$f"echo "$1" >>"$f"