Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pkgupdate-watch.sh - github.com/openwrt/buildscripts.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a4393b3a9294e59a7d55920bbb5e208b0c6c3210 (plain)
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
#!/usr/bin/env bash

. ./shared/functions.sh

trap 'clear; exit 0' SIGINT SIGTERM

clear

while true; do
	echo -en "\033[0;0f"
	fetch_remote_targets | while read target; do (
		cd "$CACHE_DIR/sdk/$target"
		log="$(find logs/ -type f -name compile.txt -printf '%C@ %h\n' 2>/dev/null | \
			sort -nr | sed -ne '1s/^[0-9.]\+ //p')"

		if [ -d "$log" ]; then
			msg="$(tail -n1 "$log/compile.txt")"
			if [ ${#msg} -gt 80 ]; then
				msg="${msg:0:80}"
			fi
		else
			log="-"
			msg=""
		fi

		printf "\033[K%-20s %-16s %s\n" "[$target]" "[${log##*/}]" "$msg"
	); done
	sleep 1
done