Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116775 - Improved version of localepurge
Summary: Improved version of localepurge
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: José Alberto Suárez López (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-26 06:24 UTC by Arvid Norlander
Modified: 2005-12-28 03:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Improved version of app-admin/localepurge (localepurge,5.31 KB, application/x-shellscript)
2005-12-26 06:25 UTC, Arvid Norlander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Norlander 2005-12-26 06:24:53 UTC
I have an improverd version of localepurge. I can't write ebuilds. Therefore I post the bash script here.

The new things are:
* Search several dirs.
* Color coded output.
Comment 1 Arvid Norlander 2005-12-26 06:25:47 UTC
Created attachment 75552 [details]
Improved version of app-admin/localepurge
Comment 2 Arvid Norlander 2005-12-26 07:09:47 UTC
Install the portage version FIRST as it creates some other needed files.
Comment 3 José Alberto Suárez López (RETIRED) gentoo-dev 2005-12-27 02:58:56 UTC
Sorry just today i relased a new veresion (0.4) with colored output, more locales and other stuff just a few minutes before to read this bug.
So thanks for all i will try to implement your "multiple dir search" stuff

regards
Comment 4 José Alberto Suárez López (RETIRED) gentoo-dev 2005-12-27 05:27:48 UTC
i just released a new version 0.5 with multi-dir search :)
try it (it's based in your code)
Comment 5 Arvid Norlander 2005-12-27 05:58:13 UTC
(In reply to comment #4)
> i just released a new version 0.5 with multi-dir search :)
> try it (it's based in your code)
> 

When is it in portage?
Comment 6 José Alberto Suárez López (RETIRED) gentoo-dev 2005-12-27 06:01:55 UTC
it is now in the main cvs so i will be xpanded to all th emirrors soon
maybe 2 hours or less
Comment 7 Arvid Norlander 2005-12-27 10:05:01 UTC
One thing:
 if [ "$SHOWFREEDSPACE" = "enabled" ]; then
   MANAFTER=$(df -P $MANPAGEDIR | awk '{if ( NR==2 ) { print $3 }}')
   MANSUM=$(($MANBEFORE - $MANAFTER))
   MANTOTAL=$(($MANTOTAL + $MANSUM))
   if [ ! $MANBEFORE = $MANAFTER ]; then
     einfo "localepurge: Disk space freed in $MANPAGEDIR:${BOLD}"$MANTOTAL"K${NORMAL}"
   fi
 fi

It should be 
einfo "localepurge: Disk space freed in $MANPAGEDIR:${BOLD}"$MANSUM"K${NORMAL}
Comment 8 Arvid Norlander 2005-12-27 10:07:57 UTC
I think using tput is better than hardcoding the colors.
Am I wrong?
Comment 9 Arvid Norlander 2005-12-27 10:09:33 UTC
And you forgot:
/opt/sun-jre-bin-*/lib/locale
Comment 10 José Alberto Suárez López (RETIRED) gentoo-dev 2005-12-28 03:16:07 UTC
fixed :)