From 7d777dc298cc15f6068b1f4d3e48a4dc81e4e613 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 15 Mar 2023 21:27:13 -0300 Subject: src/infrastructure/scripts/r.sh: Remove unused script --- src/infrastructure/guix/system.scm | 1 - src/infrastructure/scripts/r.sh | 77 -------------------------------------- 2 files changed, 78 deletions(-) delete mode 100755 src/infrastructure/scripts/r.sh (limited to 'src') diff --git a/src/infrastructure/guix/system.scm b/src/infrastructure/guix/system.scm index 6b2ff14..ff5dcca 100644 --- a/src/infrastructure/guix/system.scm +++ b/src/infrastructure/guix/system.scm @@ -310,7 +310,6 @@ trash-cli tree)) (list - (script "r" (file "src/infrastructure/scripts/r.sh")) (script "gc" (file "src/infrastructure/scripts/gc.sh")) (script "check" (file "src/infrastructure/scripts/check.sh")) (script "backup" (file "src/infrastructure/scripts/backup.sh")) diff --git a/src/infrastructure/scripts/r.sh b/src/infrastructure/scripts/r.sh deleted file mode 100755 index 8e74576..0000000 --- a/src/infrastructure/scripts/r.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <<-'EOF' - Usage: - r COMMAND... - r -h - EOF -} - -help() { - cat <<-'EOF' - - - Options: - -h, --help show this message - - COMMAND the command to be executed - - - Execute the given command, with a proper login environment - loaded. - - - Examples: - - Run a backup via SSH: - - $ ssh euandre.org r backup -q cron - EOF -} - - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -while getopts 'h' flag; do - case "$flag" in - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - -if [ -z "${1:-}" ]; then - printf 'Missing COMMAND.\n\n' >&2 - usage >&2 - exit 2 -fi - - -set +eu -# shellcheck source=/dev/null -. /etc/rc -set -eu - -exec "$@" -- cgit v1.2.3