Added to logs auto refresh

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
Marcin Woźniak 2021-04-24 00:41:14 +02:00
parent a5cfb44c1c
commit 552675eb7a
Signed by: y0rune
GPG Key ID: F204C385F57EB348
3 changed files with 46 additions and 14 deletions

23
.local/bin/Logc Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
NUMBER="-1"
while true
do
clear
LOGS=( $(sudo find /var/tmp/portage/ -mindepth 1 -maxdepth 5 -name "build.log") $(sudo find /var/tmpnotmpfs/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 -rsp $'Select number to show logs...\n' -t2 -n1 NUMBER
[[ $NUMBER -gt 0 ]] && break
done
echo -e "\n\e[93m File: ${LOGS[$NUMBER-1]} \e[0m\n"
sudo cat ${LOGS[$NUMBER-1]}

View File

@ -1 +0,0 @@
emerge-logs

23
.local/bin/Logs Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
NUMBER="-1"
while true
do
clear
LOGS=( $(sudo find /var/tmp/portage/ -mindepth 1 -maxdepth 5 -name "build.log") $(sudo find /var/tmpnotmpfs/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 -rsp $'Select number to show logs...\n' -t2 -n1 NUMBER
[[ $NUMBER -gt 0 ]] && break
done
echo -e "\n\e[93m File: ${LOGS[$NUMBER-1]} \e[0m\n"
sudo tail -f ${LOGS[$NUMBER-1]}

View File

@ -1,13 +0,0 @@
#!/bin/bash
LOGS=( $(sudo find /var/tmp/portage/ -mindepth 1 -maxdepth 5 -name "build.log") $(sudo find /var/tmpnotmpfs/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]}