c4311108ea
There were heaps of "if type -t git" there already; it wasn't an unintentional mishap but rather a moderate copy-paste to get the use cases, and now these seem to have essentially settled. So time to scrap some dups. NB: the scripts in the generated profile can't rely on the contents of the metaprofile (these need to be able to work in standalone case either), so a bit of crap still lurks there.
12 lines
219 B
Bash
Executable File
12 lines
219 B
Bash
Executable File
#!/bin/sh
|
|
# report on git repo in the current directory
|
|
|
|
if type -t git >&/dev/null; then
|
|
if pushd "$1" >/dev/null && [ -d .git ]; then
|
|
git show-ref --head -ds -- HEAD
|
|
git status -s
|
|
echo
|
|
popd >/dev/null
|
|
fi
|
|
fi
|