Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Stupid Elog Script
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
twistor
n00b
n00b


Joined: 30 Aug 2004
Posts: 41

PostPosted: Tue Oct 31, 2006 8:04 am    Post subject: Stupid Elog Script Reply with quote

I get annoyed trying to read each file in the elog directory seeing as how most of them are repeated from previous merges. So I wrote this stupid script to get through them faster. Maybe someone else can use or improve it.
Code:

#!/bin/bash
logdir="/var/log/portage/elog/"
OPTIONS="Delete Perform Skip Quit"

menu1 () {
  echo "$line"
  select opt in $OPTIONS; do
    if [ "$opt" = "Quit" ]; then
     clear
     echo "done"
     exit
    elif [ "$opt" = "Delete" ]; then
     rm "$logdir$1"
     clear
     return
    elif [ "$opt" = "Perform" ]; then
     clear
     cat "$logdir$1"
     exit
    elif [ "$opt" = "Skip" ]; then
     clear
     return
    else
     clear
     echo "Bad Option"
    fi
  done
}

for line in $(ls $logdir); do
  cat "$logdir$line"
  menu1 $line
done


Just a note, perform doesnt actually perform anything it just quits while reprinting the log on the screen so you can see what to do.
Also, I am not a programmer in any way shape or form.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3231

PostPosted: Tue Oct 31, 2006 7:44 pm    Post subject: Reply with quote

There is already a "elogviewer" somewhere in this forum. And there are several versions of that (kelogviewer, etc) also present in some thread. The search function might help.
Back to top
View user's profile Send private message
twistor
n00b
n00b


Joined: 30 Aug 2004
Posts: 41

PostPosted: Thu Nov 02, 2006 8:51 am    Post subject: Reply with quote

thanks for the info
Back to top
View user's profile Send private message
V-Li
Developer
Developer


Joined: 03 Jan 2006
Posts: 601

PostPosted: Mon Nov 06, 2006 1:36 am    Post subject: Reply with quote

And now a text mode and a GTK+ frontend are to be found in Portage

app-portage/elogv
app-portage/elogviewer
_________________
Christian Faulhammer, Gentoo Lisp project, GNU Emacs wrangler
http://www.gentoo.org/proj/en/lisp/ #gentoo-lisp on FreeNode
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum