feat: improve scripts and write tests
This commit is contained in:
32 files changed
+3817
-723
No files matched your search
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Fake `pass`. Supports only: pass init <gpg-id> Env: FAKE_PASS_FAIL=1, FAKE_PASS_LOG
|
||||
echo "pass $*" >> "${FAKE_PASS_LOG:-/dev/null}"
|
||||
[[ -z "${FAKE_PASS_FAIL:-}" ]] || { echo "pass: simulated failure" >&2; exit 1; }
|
||||
[[ "$1" == init ]] || { echo "fake pass: unsupported: $*" >&2; exit 1; }
|
||||
dir="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
|
||||
mkdir -p "$dir"; printf '%s\n' "$2" > "$dir/.gpg-id"
|
||||
Reference in new issue
Block a user