From: Christian Heller Date: Thu, 3 Apr 2025 08:55:31 +0000 (+0200) Subject: Fix. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/%7B%7Bdb.prefix%7D%7D/day?a=commitdiff_plain;h=f07fd0b2c1197c0ced60b618257104a2cf0c2441;p=config Fix. --- diff --git a/testing/home/desktop/.local/bin/borgplom b/testing/home/desktop/.local/bin/borgplom index aa7b6ac..6d30f41 100755 --- a/testing/home/desktop/.local/bin/borgplom +++ b/testing/home/desktop/.local/bin/borgplom @@ -1,6 +1,7 @@ #!/bin/sh set -e cd $(dirname "$0") +. lib/abort . lib/constants_borg # PATH_BORG_CONF . lib/get_passphrase . lib/path_tmp_timestamped @@ -42,14 +43,8 @@ _print_usage() { } # exits -error_exit() { - echo "Aborting due to $1" - exit 1 -} - -error_exit_with_usage() { - error_exit "${1}\n\n$(_print_usage)" -} +error_exit() { abort "Aborting due to $1"; } +error_exit_with_usage() { error_exit "${1}\n\n$(_print_usage)"; } # commands COMMANDS='backup_keys claim help keys orgpull' @@ -58,12 +53,12 @@ _check_args_n() { _N_MAX_ARGS="$1" shift 1 if [ "$#" -lt "${_N_MAX_ARGS}" ]; then - error_exit "missing arguments ($# instead of ${_N_MAX_ARGS})." + error_exit_with_usage "missing arguments ($# instead of ${_N_MAX_ARGS})." fi shift "${_N_MAX_ARGS}" if [ "$#" -gt 0 ]; then _MSG="unexpected arguments beyond expected number: $@" - error_exit "${_MSG}" + error_exit_with_usage "${_MSG}" fi } diff --git a/testing/scripts/_setup_secrets_user.sh b/testing/scripts/_setup_secrets_user.sh index 990f330..a280dca 100644 --- a/testing/scripts/_setup_secrets_user.sh +++ b/testing/scripts/_setup_secrets_user.sh @@ -50,7 +50,7 @@ cd "${PATH_REPOS}" ssh ${REPOS_SITE_LOGIN} "cd ${REMOTE_PATH_REPOS} && ls -1" | while read REPO_NAME; do git clone --recurse "${REPOS_SITE_LOGIN}:${REMOTE_PATH_REPOS}/${REPO_NAME}" done -cd - +cd - > /dev/null echo "\nSetting up borg and pull in ~/org" cd "${PATH_SECRETS_BORGKEYS}"