home · contact · privacy
Refactor both scripts into one setup_static_website?
[config] / all_new_2018 / user_files / encrypter.sh
1 #!/bin/sh
2 # Encrypt dated weechatlog files older than one day to GPG target defined in
3 # ~/.encrypt_target
4 set -e
5
6 gpg_key=$(cat ~/.encrypt_target)
7 cd ~/weechatlogs/irc/
8 find . -regextype posix-egrep -regex '^.*/.*/.*\.[0-9]{4}-[0-9]{2}-[0-9]{2}\.weechatlog$' -type f -mtime +1 -exec gpg --recipient "${gpg_key}" --trust-model always --encrypt {} \; -exec rm {} \;
9