blob: 9bd7e3bfaf45098d755b249ea6d67d7d2d1aa84a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/sh
# Backup a directory using GPG.
# Usage: bkdir directory-name
# Requires: tar, gpg, sha256sum (i.e. GNU/Linux).
DIRECTORY="$1"
tar czvf "$DIRECTORY.tar.gz" "$DIRECTORY"
gpg --encrypt --armor --symmetric --output "$DIRECTORY.tar.gz.gpg" "$DIRECTORY.tar.gz"
sha256sum "$DIRECTORY.tar.gz.gpg" | cut -c1-64 > "$DIRECTORY.tar.gz.sum"
|