14 lines
271 B
Plaintext
14 lines
271 B
Plaintext
|
#!/bin/bash
|
||
|
LOGS=( $(sudo find /var/tmp/portage/ -mindepth 1 -maxdepth 5 -name "build.log") )
|
||
|
LEN=${#LOGS[@]}
|
||
|
|
||
|
for (( i=0; i<$LEN; i++ ));
|
||
|
do
|
||
|
echo "$(( $i + 1 )) - ${LOGS[$i]}"
|
||
|
done
|
||
|
|
||
|
echo
|
||
|
read -p 'Select number to show logs: ' NUMBER
|
||
|
|
||
|
sudo tail -f ${LOGS[$NUMBER-1]}
|