From 7f449df84d7c045257917c5f9246a7d3457c7711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Sun, 4 Oct 2020 00:45:44 +0200 Subject: [PATCH] Added emerge-logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .local/bin/emerge-logs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 .local/bin/emerge-logs diff --git a/.local/bin/emerge-logs b/.local/bin/emerge-logs new file mode 100755 index 0000000..0f3575b --- /dev/null +++ b/.local/bin/emerge-logs @@ -0,0 +1,13 @@ +#!/bin/bash +LOGS=( $(sudo find /var/tmp/portage/ -mindepth 3 -name "build.log") ) +LEN=${#LOGS[@]} + +for (( i=0; i<$LEN; i++ )); +do + echo "$i - ${LOGS[$i]}" +done + +echo +read -p 'Select number to show logs: ' NUMBER + +sudo tail -f ${LOGS[$NUMBER]}