mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-27 21:54:18 +01:00
14 lines
417 B
Bash
Executable File
14 lines
417 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Check for git and a git repo.
|
|
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
|
|
comm=`git log --pretty=oneline -n1 | awk ' { print $1 }'`
|
|
printf "%s" ""`printf "%s" \`git describe --abbrev=4 --match mini-\* $comm | awk '{ sub (/mini-/, ""); print;}'\``
|
|
|
|
# Are there uncommitted changes?
|
|
git update-index --refresh --unmerged > /dev/null
|
|
git diff-index --quiet HEAD || printf "%s" '*'
|
|
fi
|
|
|
|
echo
|