This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
idhub-docker/status.sh

32 lines
850 B
Bash
Raw Normal View History

2024-02-20 09:57:28 +00:00
#!/bin/sh
set -e
set -u
# DEBUG
#set -x
main() {
2024-02-20 09:59:56 +00:00
cd "$(dirname "${0}")"
2024-02-20 09:57:28 +00:00
instances="$(find . -maxdepth 1 -type d \
| grep -E 'pilot|instance' \
| cut -d'_' -f3
)"
for i in ${instances}; do
dirs="$(find . -maxdepth 1 -type d \
| grep -E 'pilot|instance' \
| grep "${i}"
)"
echo "- ${i}"
for d in ${dirs}; do
cd ${d}
commit="$(git log --pretty=format:'%H' -n 1)"
cd - >/dev/null
d_name="$(basename "${d}")"
echo " - ${d_name}, commit: ${commit}"
done
done
}
main "${@}"