Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users Forum italiano (Italian) Risorse italiane (documentazione e tools)
  • Search

[TOOL] viewcl 0.9.1 - ChangeLog Viewer

Forum riservato alla documentazione in italiano.

Moderator: ago

Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
Author
Message
_sys/sid
Guru
Guru
User avatar
Posts: 346
Joined: Fri Aug 27, 2004 5:07 pm
Location: Asola (Mantova)
Contact:
Contact _sys/sid
Website

[TOOL] viewcl 0.9.1 - ChangeLog Viewer

  • Quote

Post by _sys/sid » Mon Nov 08, 2004 5:57 pm

viewcl 0.9.1 - ChangeLog Viewer http://gensid.altervista.org/devel/dev- ... /viewcl.sh
Questo Tool Permette di andare a vedere i ChangeLog che vi interessano direttamente senza
andare nelle varie directory del portage. Non e' una gran cosa ma penso sia utile.

Code: Select all

#!/bin/bash
# Gentoo (Portage/Overlays) ChangeLog Viewer. 0.9.1
# Salvate questo script come 'changelog' in una direcory del tipo '/usr/bin'
# o comunque una directory eseguibile.
# Entrate nella directory dove avete salvato questo file 
# e date il comando 'chmod 755 changelog'

PROGRAM_NAME="viewcl"
PROGRAM_VERSION="0.9.1"

COLOR_DEFAULT='\033[0m'
COLOR_WHITE='\33[01;37m'
COLOR_LRED='\033[1;31m'
COLOR_LGREEN='\033[1;32m'
COLOR_LYELLOW='\033[1;33m'

SYMBOL_OK="${COLOR_LGREEN} *${COLOR_DEFAULT}"
SYMBOL_ER="${COLOR_LRED} *${COLOR_DEFAULT}"
SYMBOL_WR="${COLOR_LYELLOW} *${COLOR_DEFAULT}"


# Find $PORTDIR in /etc/make.conf or in /etc/make.globals...
# Default $PORTDIR = "/usr/portage"
if [ -f "/etc/make.conf" ]; then
	source /etc/make.conf
	if [ -f ${PORTDIR} ]; then
		if [ -f "/etc/make.globals" ]; then
			source /etc/make.globals
			if [ -f ${PORTDIR} ]; then
				PORTDIR="/usr/portage"
			fi
		fi
	fi
	if [ -f ${PORTDIR_OVERLAY} ]; then
		if [ -f "/etc/make.globals" ]; then
			source /etc/make.globals
			if [ -f ${PORTDIR_OVERLAY} ]; then
				PORTDIR_OVERLAY="/usr/local/overlays"
			fi
		fi
	fi
else
	if [ -f "/etc/make.globals" ]; then
		source /etc/make.globals
		if [ -f ${PORTDIR} ]; then
			PORTDIR="/usr/portage"			
		fi
		if [ -f ${PORTDIR_OVERLAY} ]; then
			PORTDIR_OVERLAY="/usr/local/overlays"
		fi
	fi
fi


# Print Help, Usage and Info...
chlogviewer_usage() {
	echo "ChangeLog Viewer ${PROGRAM_VERSION}"
	echo
	echo -e "${COLOR_WHITE} Usage:${COLOR_DEFAULT}"
	echo "    ${PROGRAM_NAME} [ app name ] [ ... ]"
	echo "    ${PROGRAM_NAME} --dir='<dir>' [ app name ] [ ... ]"
	echo
	echo -e "${SYMBOL_WR} Use Options '--dir=<dir>' for change ChangeLog find dir."
	echo
	echo
	echo -e "${COLOR_WHITE} Examples:${COLOR_DEFAULT}"
	echo "    ${PROGRAM_NAME} x11-wm/fluxbox"
	echo "    ${PROGRAM_NAME} fluxbox xorg-x11 mm-sources"
	echo "    ${PROGRAM_NAME} morph-sources nitro-sources"
	echo "    ${PROGRAM_NAME} --dir='/home/myChangeLog' myprog"
	echo
	echo -e "${SYMBOL_WR} Portage Dir: '${PORTDIR}'"
	echo -e "${SYMBOL_WR} Portage Overlays Dir: '${PORTDIR_OVERLAY}'"
	echo
	echo
	echo "Report Bugs to <matteo_bertozzi@bsdmail.com>"
	echo
}


# 'Search' and 'print' ChangeLog.
get_ChangeLog() {
	chk_dir=$(echo ${1} | grep '/')
	if [ "${chk_dir}" = '' ]; then
		PATH_CHANGELOG="*/${1}"
	else
		PATH_CHANGELOG="${1}"
	fi
 
	if [ -s ${PORTDIR}/${PATH_CHANGELOG}/ChangeLog ]; then
		echo -e "${SYMBOL_OK} '${1}' Changelog"
		cat ${PORTDIR}/${PATH_CHANGELOG}/ChangeLog | less
	else
		if [ -s ${PORTDIR_OVERLAY}/${PATH_CHANGELOG}/ChangeLog ]; then
			echo -e "${SYMBOL_OK} '${1}' Changelog in Overlays."
			cat ${PORTDIR_OVERLAY}/${PATH_CHANGELOG}/ChangeLog | less
		else
			echo -e "${SYMBOL_ER} '${1}' ChangeLog Not Found..."
			sleep ${2}
		fi
	fi
}


# M A I N
if [ $# -gt 0 ]; then
	time=1
	if [ $# -eq 1 ]; then
		time=0
	fi

	for argv in $@; do
		case "${argv}" in
			--dir=*) PORTDIR=$(echo ${argv} | cut -d '=' -f 2-)
					 if [ $# -eq 2 ]; then
						time=0
					 fi
					 break;;
			--help) chlogviewer_usage
					exit 0;;
		esac
	done
	
	# Loop for print ChangeLog.
	for app in $@; do
		if [ "$(echo ${app} | cut -d '=' -f 1-1)" != "--dir" ]; then
			get_ChangeLog ${app} ${time}
		fi
	done
else
	chlogviewer_usage
fi

Code: Select all

ChangeLog Viewer 0.9.1

 Usage:
    viewcl [ app name ] [ ... ]
    viewcl --dir='<dir>' [ app name ] [ ... ]

 * Use Options '--dir=<dir>' for change ChangeLog find dir.


 Examples:
    viewcl x11-wm/fluxbox
    viewcl fluxbox xorg-x11 mm-sources
    viewcl morph-sources nitro-sources
    viewcl --dir='/home/myChangeLog' myprog

 * Portage Dir: '/usr/portage'
 * Portage Overlays Dir: '/usr/local/overlays'


Report Bugs to <matteo_bertozzi@bsdmail.com>
Questo programma ha un funzionamente simile a emerge:
la sintassi e' changelog nomePacchetto.
Sarebbe meglio specificare la cartella in cui si trova il pacchetto:

Code: Select all

Es.
   viewcl dev-lang/python
   viewcl sys-kernel/gentoo-dev-sources
ma e' anche possibile dare solo il nome del pacchetto:

Code: Select all

Es.
   viewcl python
   viewcl gentoo-dev-sources
Il Risultato e' uguale...

L'Installazione
Per l'installazione avete due possibilita' o scaricate l'ebuild del Gekit (http://forums.gentoo.org/viewtopic.php?p=1390953) oppure date i seguenti comandi:

Code: Select all

cd /usr/bin
wget http://gensid.altervista.org/devel/dev-sh/viewcl/viewcl.sh
mv viewcl.sh viewcl
chmod 755 viewcl
Grazie per l'attenzione.
Se Avete qualche idea per migliorare il tool... Postate !!!
Last edited by _sys/sid on Tue Feb 22, 2005 6:21 pm, edited 8 times in total.
http://th30z.netsons.org/
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31977
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Mon Nov 08, 2004 5:59 pm

Ottimo cosi' resta piu' chiaro. Cambiato anche il link nei post utilissimi
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
_sys/sid
Guru
Guru
User avatar
Posts: 346
Joined: Fri Aug 27, 2004 5:07 pm
Location: Asola (Mantova)
Contact:
Contact _sys/sid
Website

  • Quote

Post by _sys/sid » Tue Feb 22, 2005 6:55 pm

- 22/02/05
Aggiunto il Supporto per la visualizzazione dei ChangeLog nella dir degli Overlays
http://th30z.netsons.org/
Top
Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Risorse italiane (documentazione e tools)”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy