_N_MAX_ARGS="$1"
shift 1
if [ "$#" -lt "${_N_MAX_ARGS}" ]; then
- error_exit "missing arguments ($# instead of ${_N_MAX_ARGS}."
+ error_exit "missing arguments ($# instead of ${_N_MAX_ARGS})."
fi
shift "${_N_MAX_ARGS}"
if [ "$#" -gt 0 ]; then
HELP_DESC_backup_keys="copy known keys to PATH/, with their repos' server names as filenames"
CMDFNC_backup_keys() {
_check_args_n 1 "$@"
- _PATH_TARGET_DIR="$1"
- if [ -e "${_PATH_TARGET_DIR}"] && [ ! -d "${_PATH_TARGET_DIR}" ]; then
+ _PATH_TARGET_DIR=$(realpath "$1")
+ if [ -e "${_PATH_TARGET_DIR}" ] && [ ! -d "${_PATH_TARGET_DIR}" ]; then
error_exit "non-directory at ${_PATH_TARGET_DIR}"
fi
mkdir -p "${_PATH_TARGET_DIR}"