Skip to content

Instantly share code, notes, and snippets.

@secemp9
Created April 26, 2021 19:58
Show Gist options
  • Save secemp9/6d4ef0b29ca60375286ce14e5ba5ccd6 to your computer and use it in GitHub Desktop.
Save secemp9/6d4ef0b29ca60375286ce14e5ba5ccd6 to your computer and use it in GitHub Desktop.
pass-sync across two directories.
pass() { if [[ "$1" == "generate" || "$1" == "edit" || "$1" == "rm" || "$1" == "mv" || "$1" == "cp" || "$1" == "git" || "$1" == "insert" ]]; then command pass "$@" ; echo -n "Backup Started..." && cd ~/.password-store ; git pull pass_disk master -v ; cd /mnt/sda1/.password-store ; git pull pass_home master -v ; echo "Done!"; else command pass "$@"; fi; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment