17 lines
337 B
Plaintext
17 lines
337 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
# Send secrets from certain files to another trusted device.
|
||
|
# WILL NOT DELETE FILES, BUT WILL OVERWRITE!
|
||
|
|
||
|
set -x
|
||
|
|
||
|
if [[ -z $1 ]]; then
|
||
|
echo "Missing user@host to send to"
|
||
|
exit 2
|
||
|
fi
|
||
|
|
||
|
files="$HOME/.ssh $HOME/.gnupg $HOME/.wakatime.cfg"
|
||
|
|
||
|
rsync -rav \
|
||
|
--exclude="$HOME/.ssh/id_*" --exclude="*.sock" \
|
||
|
$files "${1}:"
|