Skip to content

Instantly share code, notes, and snippets.

@stantonk
stantonk / hg_batch_pull.sh
Created March 7, 2012 17:05
Perform batch "pull -u" on multiple Mercurial repositories from the parent directory
#!/bin/bash
# This script finds all the mercurial repositories in the current directory
# and does a "hg pull -u" to get the latest changes from all the repositories.
#
# Make sure you know what you're doing before running this ;-)
confirm_prompt() {
read -p "Are you sure you want to 'hg pull -u' every repository? " -n 1
echo
@stantonk
stantonk / decrypt.sh
Last active May 20, 2019 02:03
Easily encrypt/decrypt and secure delete plaintext files using GPG (GNU Privacy Guard / OpenPGP) on OS X
#!/bin/bash
if test -z "$1"
then
echo "usage: decrypt <filename>"
else
gpg -q --decrypt $1
fi