-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist
30 lines (24 loc) · 762 Bytes
/
list
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#
# Informative list of the available builds
#
# This command exists because it's hard to see at a glance what
# was built and the status of those.
#
find "$BUILDS" -maxdepth 1 -mindepth 1 -type d -printf "%f %CH:%CM\n" |
while read CANDIDATE WHEN
do
SCRATCH="$BUILDS/$CANDIDATE"
METADATA="$SCRATCH/.luthier"
if ! [ -d "$METADATA" ]; then
continue
fi
STATUS=$(cat "$METADATA/status" 2> /dev/null || true)
FINGERPRINT=$(cat "$METADATA/fingerprint" 2> /dev/null || true)
SUMMARY=$(callout summary 2> /dev/null || true)
printf "%s %s %s %-8s %s\n" \
"$CANDIDATE" "$WHEN" "$FINGERPRINT" "$STATUS" "$SUMMARY"
done |
sort -n
CURRENT=$(cat "$STATE/current")
STATUS=$(cat "$STATE/status")
printf "\nCurrently: %s at %s\n" "$STATUS" "$CURRENT"