aboutsummaryrefslogtreecommitdiff
path: root/sensitive
blob: 7fc3b97a6f34c2d7f35109fc58cd72b91413e736 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash

sensitive_files=(
  "config/aerc/accounts.conf"
  "config/weechat/sec.conf"
)

if [[ "$1" == "update" ]]; then
  echo "Updating"
  for sensitive_file in ${sensitive_files[@]}; do
    echo ">> $sensitive_file"
    age -R ~/.dotfiles/age-recipients -o $sensitive_file.age $sensitive_file
  done
else
  echo "Decrypting"
  for sensitive_file in ${sensitive_files[@]}; do
    echo ">> $sensitive_file"
    age -d -i ~/.age/identities -o $sensitive_file $sensitive_file.age
  done
fi