Created
April 26, 2021 19:58
-
-
Save secemp9/6d4ef0b29ca60375286ce14e5ba5ccd6 to your computer and use it in GitHub Desktop.
pass-sync across two directories.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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