aboutsummaryrefslogtreecommitdiff
path: root/sensitive
blob: 00985242ada14053dd0818a3342d8a734724cffc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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
    age -R ~/.dotfiles/age-recipients -o $sensitive_file.age $sensitive_file
  done
else
  echo "Decrypting"
  for sensitive_file in $sensitive_files; do
    age -d -i ~/.age/identities -o $sensitive_file $sensitive_file.age
  done
fi