Skip to content

Instantly share code, notes, and snippets.

@jgriff
jgriff / git-pull
Last active April 15, 2019 15:43
Recursively walks a directory and perform a git pull (if dir is a git repo). Ignores non-git directories.
#!/bin/bash
dir="$1"
display_prefix="$2"
# No directory has been provided, use current
if [ -z "$dir" ]
then
dir="`pwd`"
fi
@jgriff
jgriff / git-status
Last active November 18, 2019 14:56
Recursively walks a directory and prints git status (if dir is a git repo). Ignores non-git directories.
#!/bin/bash
dir="$1"
display_prefix="$2"
option="$3"
# No directory has been provided, or a "--" option has been given instead (which can be the case when invoked by the user)
# In either case, use current dir
if [ -z "$dir" ] || [[ $dir == --* ]]; then
option=$dir
@jgriff
jgriff / gist:672cc7f116a8d4cea199
Last active August 29, 2015 14:15
asciidoctor-diagram graphviz substitutions not working
[graphviz]
[subs="attributes"]
----
digraph g {
{propA} -> {propB}
}
----