Skip to content

Instantly share code, notes, and snippets.

View angelacastaneda's full-sized avatar

Ángel Castañeda angelacastaneda

View GitHub Profile
@angelacastaneda
angelacastaneda / age.sh
Created October 26, 2024 21:30
age shadow script to emulate gpg {-d,-e} <file>
#!/bin/sh -eu
# shadow script that does three things:
# - 'age -e <file>' produce an ascii armored <file>.age in the same
# directory encrypted with the age_def_rec file
# - 'age -d <file>' decrypts the file to stdout with the age_def_id file
# - anything that's not a file or doesn't uses -e/-d flags gets sent to the
# proper age binary location at age_bin
age_bin=/usr/bin/rage
age_def_rec="${XDG_CONFIG_HOME:-$HOME/.config}/age/recipients.txt"