lowercase some more
arĉi arcxi@dismail.de
Tue, 01 Oct 2024 05:40:06 +0200
3 files changed,
15 insertions(+),
15 deletions(-)
M
contrib/pa-pass
→
contrib/pa-pass
@@ -2,8 +2,8 @@ #!/bin/sh
# # migrate passwords from pass to pa # -# Password dir of pass: export PASSWORD_STORE_DIR=~/.password-store -# Password dir of pa: export PA_DIR=~/.local/share/pa/passwords +# password dir of pass: export PASSWORD_STORE_DIR=~/.password-store +# password dir of pa: export PA_DIR=~/.local/share/pa/passwords : "${PASSWORD_STORE_DIR:=$HOME/.password-store}" basedir=${XDG_DATA_HOME:=$HOME/.local/share}/pa@@ -19,7 +19,7 @@ name=$(printf %s "${passfile#"$PASSWORD_STORE_DIR/"}" | sed 's/\.gpg$//')
mkdir -p "$PA_DIR/$(dirname "./$name")" gpg2 -d "$passfile" | $age -R "$basedir/recipients" -o "$PA_DIR/$name.age" && - printf '%s\n' "Saved '$name' to the store." + printf '%s\n' "saved '$name' to the store." done if [ -z "${PA_NOGIT+x}" ] && command -v git >/dev/null 2>&1; then
M
contrib/pa-rekey
→
contrib/pa-rekey
@@ -23,18 +23,18 @@ basedir=${XDG_DATA_HOME:=$HOME/.local/share}/pa
: "${PA_DIR:=$basedir/passwords}" realstore=$(realpath "$PA_DIR") || - die "Couldn't get path to password directory" + die "couldn't get path to password directory" tmpdir=$basedir/tmp mkdir "$tmpdir" || - die "Couldn't create temporary directory" + die "couldn't create temporary directory" trap 'rm -rf "$tmpdir"; exit' EXIT trap 'rm -rf "$tmpdir"; trap - INT; kill -s INT 0' INT cp -Rp "$realstore" "$tmpdir/passwords" || - die "Couldn't copy password directory" + die "couldn't copy password directory" # Remove git repository for forward secrecy. rm -rf "$tmpdir/passwords/.git"@@ -48,13 +48,13 @@
pa l | while read -r name; do pa s "$name" | $age -R "$tmpdir/recipients" -o "$tmpdir/passwords/$name.age" || - die "Couldn't encrypt $name.age" + die "couldn't encrypt $name.age" done trap - INT EXIT rm -rf "$realstore" || - die "Couldn't remove password directory" + die "couldn't remove password directory" mv "$tmpdir/passwords" "$realstore" mv "$tmpdir/identities" "$(realpath "$basedir/identities")"
M
contrib/pa-urn
→
contrib/pa-urn
@@ -40,31 +40,31 @@ basedir=${XDG_DATA_HOME:=$HOME/.local/share}/pa
: "${PA_DIR:=$basedir/passwords}" dir=$(realpath "$PA_DIR") || - die "Couldn't get path to password directory" + die "couldn't get path to password directory" name=$(basename "$dir") if [ "$2" ]; then urn=$(realpath -- "$2") || - die "Couldn't get path to file '$2'" + die "couldn't get path to file '$2'" else urn=$(pwd)/$name.tar.age || - die "Couldn't get working directory" + die "couldn't get working directory" fi cd "$(dirname "$dir")" || - die "Couldn't change to parent of password directory" + die "couldn't change to parent of password directory" case $1 in c*) { create_tar "$name" | $age -R "$basedir/recipients" -o "$urn"; } && - printf '%s\n' "Store has been archived into $urn" + printf '%s\n' "store has been archived into $urn" ;; o*) [ -f "$urn" ] || - die "File '$urn' doesn't exist" + die "file '$urn' doesn't exist" { $age --decrypt -i "$basedir/identities" "$urn" | extract_tar; } && - printf '%s\n' "File has been extracted into $PA_DIR" + printf '%s\n' "file has been extracted into $PA_DIR" ;; *) usage ;; esac