2020-10-04 00:45:44 +02:00
|
|
|
#!/bin/bash
|
2020-11-10 00:26:41 +01:00
|
|
|
LOGS=( $(sudo find /var/tmp/portage/ -mindepth 1 -maxdepth 5 -name "build.log") )
|
2020-10-04 00:45:44 +02:00
|
|
|
LEN=${#LOGS[@]}
|
|
|
|
|
2020-11-23 14:51:27 +01:00
|
|
|
for (( i=0; i<$LEN; i++ ));
|
2020-10-04 00:45:44 +02:00
|
|
|
do
|
2020-11-23 14:51:27 +01:00
|
|
|
echo "$(( $i + 1 )) - ${LOGS[$i]}"
|
2020-10-04 00:45:44 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
echo
|
|
|
|
read -p 'Select number to show logs: ' NUMBER
|
|
|
|
|
2020-11-23 13:56:00 +01:00
|
|
|
sudo tail -f ${LOGS[$NUMBER-1]}
|