aboutsummaryrefslogtreecommitdiff
path: root/dbx-link
diff options
context:
space:
mode:
Diffstat (limited to 'dbx-link')
-rwxr-xr-xdbx-link30
1 files changed, 0 insertions, 30 deletions
diff --git a/dbx-link b/dbx-link
deleted file mode 100755
index cab4ecb..0000000
--- a/dbx-link
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env bash
-# SPDX-License-Identifier: GPL-3.0-only
-
-set -euo pipefail
-
-if [[ $# -ne 1 ]]; then
- echo "ERROR: missing command to link" >&2
- exit 1
-fi
-
-r="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
-c="dbx"
-p="$HOME/.local/share/dbx/bin"
-
-cmd="$1"
-link="$p/$cmd"
-if [[ -e "$link" ]]; then
- echo "already linked"
- exit
-fi
-
-if ! "$r/dbx-run" which "$cmd" &>/dev/null; then
- echo "ERROR: command '$cmd' not found"
- exit 1
-fi
-
-mkdir -p "$p"
-echo "#!/bin/sh" > "$link"
-echo "exec '$r/dbx-run' '$cmd' "'"$@"' >> "$link"
-chmod +x "$link"