public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/localepurge:master commit in: /
@ 2012-12-04 21:11 Wim Muskee
  0 siblings, 0 replies; 9+ messages in thread
From: Wim Muskee @ 2012-12-04 21:11 UTC (permalink / raw
  To: gentoo-commits

commit:     b5b587ab87f1ede8a41b7922475d471da1c3c299
Author:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
AuthorDate: Tue Dec  4 21:02:53 2012 +0000
Commit:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
CommitDate: Tue Dec  4 21:02:53 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/localepurge.git;a=commit;h=b5b587ab

Err, forgot to add the sum for each directory.

---
 localepurge |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/localepurge b/localepurge
index aef8156..e2e5ee4 100755
--- a/localepurge
+++ b/localepurge
@@ -198,7 +198,7 @@ purgelocale () {
 
         if [ "$SHOWFREEDSPACE" = "enabled" ]; then
            if test $SPACETMP -gt 0 ; then
-               LOCALETOTAL=$SPACETMP
+               LOCALETOTAL=$(($LOCALETOTAL + $SPACETMP))
                einfo "localepurge: Disk space freed in $LOCALEDIR: ${BOLD}"$SPACETMP"K${NORMAL}"
            fi
            SPACETMP=0
@@ -230,7 +230,7 @@ purgeman () {
 
         if [ "$SHOWFREEDSPACE" = "enabled" ]; then
            if test $SPACETMP -gt 0 ; then
-               MANTOTAL=$SPACETMP
+               MANTOTAL=$(($MANTOTAL + $SPACETMP))
                einfo "localepurge: Disk space freed in $MANPAGEDIR: ${BOLD}"$SPACETMP"K${NORMAL}"
            fi
            SPACETMP=0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/localepurge:master commit in: /
@ 2012-12-04 21:11 Wim Muskee
  0 siblings, 0 replies; 9+ messages in thread
From: Wim Muskee @ 2012-12-04 21:11 UTC (permalink / raw
  To: gentoo-commits

commit:     93d990e924c9f514da4dd4e00b131060924538f6
Author:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
AuthorDate: Tue Dec  4 21:11:11 2012 +0000
Commit:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
CommitDate: Tue Dec  4 21:11:11 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/localepurge.git;a=commit;h=93d990e9

Make rm only use verbose option when verbose is selected.

---
 localepurge |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/localepurge b/localepurge
index e2e5ee4..e2279ed 100755
--- a/localepurge
+++ b/localepurge
@@ -23,7 +23,7 @@ HILITE=$'\e[36;01m'
 BRACKET=$'\e[34;01m'
 BOLD=$'\e[1m'
 
-ACTION="/bin/rm -vf"
+ACTION="/bin/rm -f"
 
 eerror () {
     echo -e " ${BAD}*${NORMAL} $*" 2> /dev/stderr
@@ -110,6 +110,7 @@ for x in $@; do
 
     elif [ "$x" = "-verbose" ] || [ "$x" = "-v" ]; then
         VERBOSE=enabled
+        ACTION="/bin/rm -vf"
 
     elif [ "$x" = "-version" ] ; then
         version


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/localepurge:master commit in: /
@ 2012-12-05 17:04 Wim Muskee
  0 siblings, 0 replies; 9+ messages in thread
From: Wim Muskee @ 2012-12-05 17:04 UTC (permalink / raw
  To: gentoo-commits

commit:     84de87968990d03700d2ae3feeaab81b380edc0e
Author:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
AuthorDate: Wed Dec  5 17:03:53 2012 +0000
Commit:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
CommitDate: Wed Dec  5 17:03:53 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/localepurge.git;a=commit;h=84de8796

When localedir is symlink, do free space check on parentdir because it gets removed.

---
 localepurge |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/localepurge b/localepurge
index e2279ed..10e32bb 100755
--- a/localepurge
+++ b/localepurge
@@ -166,7 +166,13 @@ remove() {
     ${ACTION} `find ${REMOVEPATH} -type f -o -type l`
 
     if [ "$SHOWFREEDSPACE" = "enabled" ]; then
-        SPACEAFTER=$(df -P ${REMOVEPATH} | awk '{if ( NR==2 ) { print $3 }}')
+        # if symlink, REMOVEPATH could be removed
+        # check from parentdir then
+    	if [ -d ${REMOVEPATH} ]; then
+            SPACEAFTER=$(df -P ${REMOVEPATH} | awk '{if ( NR==2 ) { print $3 }}')
+        else
+            SPACEAFTER=$(df -P ${REMOVEPATH%/*} | awk '{if ( NR==2 ) { print $3 }}')
+        fi
         SPACESUM=$(($SPACEBEFORE - $SPACEAFTER))
 
         if test $SPACESUM -gt 0 ; then


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/localepurge:master commit in: /
@ 2012-12-05 17:45 Wim Muskee
  0 siblings, 0 replies; 9+ messages in thread
From: Wim Muskee @ 2012-12-05 17:45 UTC (permalink / raw
  To: gentoo-commits

commit:     5a18d79a6801f60b73011e137e662ecec9db2587
Author:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
AuthorDate: Wed Dec  5 17:32:33 2012 +0000
Commit:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
CommitDate: Wed Dec  5 17:32:33 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/localepurge.git;a=commit;h=5a18d79a

Make the script better maintainable for Gentoo Prefix.

---
 localepurge |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/localepurge b/localepurge
index 10e32bb..9cbbffb 100755
--- a/localepurge
+++ b/localepurge
@@ -5,10 +5,15 @@
 
 set -e
 
+# For use in Gentoo Prefix
+PREFIX=""
+
+# these are prefixed when called for
 LOCALEDIRS="/usr/share/locale /usr/local/share/locale /usr/kde/?.?/share/locale /opt/sun-jdk-*/jre/lib/locale /opt/sun-jre-bin-*/lib/locale /usr/lib/locale /usr/share/binutils-data/*/*/locale /usr/share/gcc-data/*/*/locale"
 MANPAGEDIRS="/usr/share/man /usr/man /usr/local/share/man /usr/kde/?.?/share/man /usr/kde/?.?/man /opt/sun-jdk-*/man /opt/sun-jre-bin-*/man"
-LOCALELIST="/var/cache/localepurge/localelist"
-CONFIGFILE="/etc/locale.nopurge"
+
+LOCALELIST="${PREFIX}/var/cache/localepurge/localelist"
+CONFIGFILE="${PREFIX}/etc/locale.nopurge"
 VERSION="0.5.4"
 
 LOCALETOTAL=0
@@ -23,7 +28,7 @@ HILITE=$'\e[36;01m'
 BRACKET=$'\e[34;01m'
 BOLD=$'\e[1m'
 
-ACTION="/bin/rm -f"
+ACTION="rm -f"
 
 eerror () {
     echo -e " ${BAD}*${NORMAL} $*" 2> /dev/stderr
@@ -43,7 +48,7 @@ etab () {
 print() {
     for x in $@; do
         if [ "${x}" = "" ]; then return 0
-        else /bin/echo $x
+        else echo $x
         fi
     done
 }
@@ -110,7 +115,7 @@ for x in $@; do
 
     elif [ "$x" = "-verbose" ] || [ "$x" = "-v" ]; then
         VERBOSE=enabled
-        ACTION="/bin/rm -vf"
+        ACTION="rm -vf"
 
     elif [ "$x" = "-version" ] ; then
         version
@@ -191,7 +196,7 @@ purgelocale () {
             einfo "localepurge: processing locale files in ${LOCALEDIR} ..."
         fi
 
-        for LOCALE in `/bin/ls ${LOCALEDIR}`; do
+        for LOCALE in `ls ${LOCALEDIR}`; do
             if echo "${PURGELIST}" | grep -xq ${LOCALE}; then
                 if [ -d ${LOCALEDIR}/${LOCALE}/LC_MESSAGES ]; then
                     if [ "${LIST}" = "enabled" ]; then 
@@ -223,7 +228,7 @@ purgeman () {
             einfo "localepurge: processing man pages in ${MANPAGEDIR} ..."
         fi
 
-        for LOCALE in `/bin/ls ${MANPAGEDIR} | grep -v ^man[1-9]`; do
+        for LOCALE in `ls ${MANPAGEDIR} | grep -v ^man[1-9]`; do
             if echo "${PURGELIST}" | grep -xq ${LOCALE}; then
                 if [ -d ${MANPAGEDIR}/${LOCALE} ]; then
                     if [ "${LIST}" = "enabled" ]; then
@@ -252,11 +257,11 @@ purgeman () {
     ewarn "If not pretending, localepurge would delete the following files:\n"
 
 for folder in ${LOCALEDIRS}; do
-    purgelocale "$folder"
+    purgelocale "${PREFIX}$folder"
 done
 
 for folder in ${MANPAGEDIRS}; do
-    purgeman "$folder"
+    purgeman "${PREFIX}$folder"
 done
 
 # Calculating and reporting total disk space freed:


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/localepurge:master commit in: /
@ 2012-12-05 17:45 Wim Muskee
  0 siblings, 0 replies; 9+ messages in thread
From: Wim Muskee @ 2012-12-05 17:45 UTC (permalink / raw
  To: gentoo-commits

commit:     d979ca9f4a7110346bd342e5c0ef3ce5dbbab0ae
Author:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
AuthorDate: Wed Dec  5 17:44:42 2012 +0000
Commit:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
CommitDate: Wed Dec  5 17:44:42 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/localepurge.git;a=commit;h=d979ca9f

Removed useless etab function, also fix more tabs-spaces.

---
 localepurge |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/localepurge b/localepurge
index 9cbbffb..f31867f 100755
--- a/localepurge
+++ b/localepurge
@@ -41,9 +41,6 @@ ewarn () {
 einfo () {
     echo -e " ${GOOD}*${NORMAL} $*"
 }
-etab () {
-    echo -e " ${GOOD}*${NORMAL} $*"
-}
 
 print() {
     for x in $@; do
@@ -61,13 +58,13 @@ ayuda () {
     echo
     einfo "Usage: `basename $0` [options]"
     echo
-    etab "${BOLD}-debug (-d)    ${NORMAL}  : debug mode."
-    etab "${BOLD}-help (-h)	${NORMAL}  : show this help."    
-    etab "${BOLD}-list (-l)	${NORMAL}  : list directories to be cleared"
-    etab "${BOLD}-nocolor (-nc) ${NORMAL}  : no color mode."
-    etab "${BOLD}-pretend (-p)  ${NORMAL}  : pretend mode."
-    etab "${BOLD}-verbose (-v)	${NORMAL}  : verbose mode."
-    etab "${BOLD}-version	${NORMAL}  : show version."
+    einfo "${BOLD}-debug (-d)    ${NORMAL}  : debug mode."
+    einfo "${BOLD}-help (-h)     ${NORMAL}  : show this help."    
+    einfo "${BOLD}-list (-l)     ${NORMAL}  : list directories to be cleared"
+    einfo "${BOLD}-nocolor (-nc) ${NORMAL}  : no color mode."
+    einfo "${BOLD}-pretend (-p)  ${NORMAL}  : pretend mode."
+    einfo "${BOLD}-verbose (-v)  ${NORMAL}  : verbose mode."
+    einfo "${BOLD}-version       ${NORMAL}  : show version."
     echo
 }
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/localepurge:master commit in: /
@ 2012-12-07 19:26 Wim Muskee
  0 siblings, 0 replies; 9+ messages in thread
From: Wim Muskee @ 2012-12-07 19:26 UTC (permalink / raw
  To: gentoo-commits

commit:     3e30bbfd7be4d5a37ba9e7238a3204ea96380191
Author:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
AuthorDate: Fri Dec  7 19:25:47 2012 +0000
Commit:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
CommitDate: Fri Dec  7 19:25:47 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/localepurge.git;a=commit;h=3e30bbfd

Generate localelist from glibc supported locales and packaged list.

---
 defaultlist      |  346 ------------------------------------------------------
 localelist-extra |   44 +++++++
 localepurge      |   37 +++++-
 3 files changed, 77 insertions(+), 350 deletions(-)

diff --git a/defaultlist b/defaultlist
deleted file mode 100644
index 59c5d3f..0000000
--- a/defaultlist
+++ /dev/null
@@ -1,346 +0,0 @@
-aa
-af
-af_ZA
-am
-am_ET
-ang
-ar
-ar_AE
-ar_BH
-ar_DZ
-ar_EG
-ar_IN
-ar_IQ
-ar_JO
-ar_KW
-ar_LB
-ar_LY
-ar_MA
-ar_OM
-ar_QA
-ar_SA
-ar_SD
-ar_SY
-ar_TN
-ar_YE
-as
-ast
-az
-az_AZ
-az_IR
-be
-be@latin
-be_BY
-bg
-bg_BG
-bn
-bn_IN
-br
-br_FR
-bs
-bs_BA
-byn
-ca
-ca@valencia
-ca_ES
-ca_ES@euro
-ca_ES@valencia
-chs
-cht
-crh
-cs
-cs_CZ
-cy
-cy_GB
-cz
-da
-da_DK
-de
-de_AT
-de_AT@euro
-de_BE
-de_BE@euro
-de_CH
-de_DE
-de_DE.UTF-8
-de_DE@euro
-de_LU
-de_LU@euro
-dk
-dv
-dz
-el
-el_GR
-el_GR.UTF-8
-el_GR@euro
-en
-en@IPA
-en@boldquot
-en@quot
-en@shaw
-en_AU
-en_BW
-en_CA
-en_DK
-en_GB
-en_GB.UTF-8
-en_HK
-en_IE
-en_IE@euro
-en_IN
-en_NZ
-en_PH
-en_RN
-en_SG
-en_UK
-en_US
-en_US.UTF-8
-en_ZA
-en_ZW
-eo
-eo_EO
-es
-es_AR
-es_BO
-es_CL
-es_CO
-es_CR
-es_DO
-es_EC
-es_ES
-es_ES.UTF-8
-es_ES@euro
-es_GT
-es_HN
-es_MX
-es_NI
-es_PA
-es_PE
-es_PR
-es_PY
-es_SV
-es_US
-es_UY
-es_VE
-et
-et_EE
-eu
-eu_ES
-eu_ES@euro
-fa
-fa_IR
-fa_IR.UTF-8
-fi
-fi_FI
-fi_FI@euro
-fo
-fo_FO
-fr
-fr_BE
-fr_BE@euro
-fr_CA
-fr_CH
-fr_FR
-fr_FR.UTF-8
-fr_FR@euro
-fr_LU
-fr_LU@euro
-fur
-fy
-ga
-ga_IE
-ga_IE@euro
-gd
-gd_GB
-gez
-gl
-gl_ES
-gl_ES@euro
-gr
-gu
-gv
-gv_GB
-haw
-he
-he_IL
-hi
-hi_IN
-hi_IN.UTF-8
-hr
-hr_HR
-hu
-hu_HU
-hy
-hy_AM
-ia
-id
-id_ID
-is
-is_IS
-it
-it_CH
-it_IT
-it_IT@euro
-iu
-iw
-iw_IL
-ja
-ja_JP
-ja_JP.EUC
-ja_JP.EUC-JP
-ja_JP.UTF-8
-ja_JP.eucJP
-ka
-ka_GE
-kk
-kl
-kl_GL
-km
-km_KH
-kn
-ko
-ko_KR
-ko_KR.EUC-KR
-ko_KR.UTF-8
-kok
-ku
-kw
-kw_GB
-ky
-la
-lg
-li
-lo
-lt
-lt_LT
-lv
-lv_LV
-mai
-mg
-mhr
-mi
-mi_NZ
-mk
-mk_MK
-ml
-mn
-mr
-mr_IN
-mr_IN.UTF-8
-ms
-ms_MY
-mt
-mt_MT
-my
-my_MM
-nb
-nb_NO
-nds
-ne
-nl
-nl_BE
-nl_BE@euro
-nl_NL
-nl_NL@euro
-nn
-nn_NO
-no
-no_NO
-nso
-nyc
-oc
-oc_FR
-om
-or
-pa
-pl
-pl_PL
-ps
-pt
-pt_BR
-pt_PT
-pt_PT@euro
-rm
-ro
-ro_RO
-ru
-ru_RU
-ru_RU.KOI8-R
-ru_RU.UTF-8
-ru_UA
-rw
-sa
-si
-sid
-sk
-sk_SK
-sl
-sl_SI
-so
-sp
-sq
-sq_AL
-sr
-sr@Latn
-sr@ije
-sr@latin
-sr_RS
-sr_YU
-sr_YU@cyrillic
-sv
-sv_FI
-sv_FI@euro
-sv_SE
-sw
-syr
-ta
-ta_IN
-te
-te_IN
-tg
-tg_TJ
-th
-th_TH
-ti
-ti_ER
-ti_ET
-tig
-tk
-tl
-tl_PH
-tr
-tr_TR
-tt
-tt_RU
-ug
-uk
-uk_UA
-ur
-ur_PK
-uz
-uz@Latn
-uz_UZ
-ve
-vi
-vi_VN
-vi_VN.UTF-8
-wa
-wal
-wo
-xh
-yi
-yi_US
-zh
-zh_CN
-zh_CN.GB18030
-zh_CN.GB2312
-zh_CN.GBK
-zh_CN.UTF-8
-zh_HK
-zh_HK.UTF-8
-zh_SG
-zh_TW
-zh_TW.Big5
-zh_TW.EUC-TW
-zh_TW.UTF-8
-zu

diff --git a/localelist-extra b/localelist-extra
new file mode 100644
index 0000000..848bb99
--- /dev/null
+++ b/localelist-extra
@@ -0,0 +1,44 @@
+ang
+az_IR
+be@latin
+ca@valencia
+ca_ES@valencia
+chs
+cht
+cz
+dk
+el_GR@euro
+en@IPA
+en@boldquot
+en@quot
+en@shaw
+en_RN
+en_UK
+eo
+eo_EO
+fa_IR.UTF8
+gr
+haw
+hi_IN.UTF8
+ia
+ja_JP
+ja_JP.EUC
+ja_JP.eucJP
+ko_KR
+la
+mr_IN.UTF8
+no
+no_NO
+nyc
+rm
+sp
+sr@Latn
+sr@ije
+sr@latin
+sr_YU
+sr_YU@cyrillic
+syr
+uz@Latn
+vi_VN.UTF8
+zh_CN.GB2312
+zh_TW.Big5

diff --git a/localepurge b/localepurge
index f31867f..28e2091 100755
--- a/localepurge
+++ b/localepurge
@@ -13,7 +13,10 @@ LOCALEDIRS="/usr/share/locale /usr/local/share/locale /usr/kde/?.?/share/locale
 MANPAGEDIRS="/usr/share/man /usr/man /usr/local/share/man /usr/kde/?.?/share/man /usr/kde/?.?/man /opt/sun-jdk-*/man /opt/sun-jre-bin-*/man"
 
 LOCALELIST="${PREFIX}/var/cache/localepurge/localelist"
+LOCALELIST_GLIBC="${PREFIX}/var/cache/localepurge/localelist-glibc"
+LOCALELIST_EXTRA="${PREFIX}/var/cache/localepurge/localelist-extra"
 CONFIGFILE="${PREFIX}/etc/locale.nopurge"
+
 VERSION="0.5.4"
 
 LOCALETOTAL=0
@@ -72,6 +75,25 @@ version () {
     einfo "${BRACKET}[${NORMAL} ${GOOD}${VERSION}${NORMAL} ${BRACKET}]${NORMAL}"
 }
 
+# Creates new localelist 
+# from glibc supported locales and the packaged extra locales
+
+createlist() {
+    if [ "$VERBOSE" = "enabled" ]; then
+        einfo "localepurge: updating list of locales in ${LOCALELIST} ..."
+    fi
+
+    # select all supported glibc locales
+    localeworkfile=$(mktemp)
+    cat /usr/share/i18n/SUPPORTED | cut -d ' ' -f 1 > ${localeworkfile}
+    cat /usr/share/i18n/SUPPORTED | cut -d '_' -f 1 | uniq >> ${localeworkfile}
+    cat ${localeworkfile} | sort > ${LOCALELIST_GLIBC}
+    rm ${localeworkfile}
+
+    # add the extra locales
+    cat ${LOCALELIST_GLIBC} ${LOCALELIST_EXTRA} | sort | uniq > ${LOCALELIST}
+}
+
 # Check options in CONFIGFILE
 
 grep -xq SHOWFREEDSPACE ${CONFIGFILE} && SHOWFREEDSPACE=enabled
@@ -151,10 +173,6 @@ else
     fi
 fi
 
-# Prune the locale list using CONFIGFILE as a list of regex patterns:
-
-PURGELIST=`grep -xvf ${CONFIGFILE} "${LOCALELIST}"`
-
 
 # Deleting a filepath and optionally counting freed space
 
@@ -247,6 +265,17 @@ purgeman () {
     fi
 }
 
+# If running for the first time, create new localelist:
+if [ ! -f ${LOCALELIST_GLIBC} ]; then
+    if [ "$VERBOSE" = "enabled" ]; then
+        einfo "localepurge: running for the first time"
+    fi
+    createlist
+fi
+
+# Prune the locale list using CONFIGFILE as a list of regex patterns:
+PURGELIST=`grep -xvf ${CONFIGFILE} "${LOCALELIST}"`
+
 [ "${LIST}" = "enabled" ] && [ "${VERBOSE}" = "enabled" ] &&
     ewarn "If not in list mode, localepurge would clear the following directories:\n"
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/localepurge:master commit in: /
@ 2012-12-07 19:51 Wim Muskee
  0 siblings, 0 replies; 9+ messages in thread
From: Wim Muskee @ 2012-12-07 19:51 UTC (permalink / raw
  To: gentoo-commits

commit:     228b55c94be5f3f23a6c7d61f8f08ad2973013f1
Author:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
AuthorDate: Fri Dec  7 19:51:06 2012 +0000
Commit:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
CommitDate: Fri Dec  7 19:51:06 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/localepurge.git;a=commit;h=228b55c9

Add commandline option to update localelist.

---
 localepurge |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/localepurge b/localepurge
index 28e2091..e4699f9 100755
--- a/localepurge
+++ b/localepurge
@@ -62,10 +62,11 @@ ayuda () {
     einfo "Usage: `basename $0` [options]"
     echo
     einfo "${BOLD}-debug (-d)    ${NORMAL}  : debug mode."
-    einfo "${BOLD}-help (-h)     ${NORMAL}  : show this help."    
-    einfo "${BOLD}-list (-l)     ${NORMAL}  : list directories to be cleared"
+    einfo "${BOLD}-help (-h)     ${NORMAL}  : show this help."
+    einfo "${BOLD}-list (-l)     ${NORMAL}  : list directories to be cleared."
     einfo "${BOLD}-nocolor (-nc) ${NORMAL}  : no color mode."
     einfo "${BOLD}-pretend (-p)  ${NORMAL}  : pretend mode."
+    einfo "${BOLD}-update (-u)   ${NORMAL}  : update localelist."
     einfo "${BOLD}-verbose (-v)  ${NORMAL}  : verbose mode."
     einfo "${BOLD}-version       ${NORMAL}  : show version."
     echo
@@ -132,6 +133,10 @@ for x in $@; do
         ACTION=print
         SHOWFREEDSPACE=disabled
 
+    elif [ "$x" = "-update" ] || [ "$x" = "-u" ]; then
+        createlist
+        exit 0
+
     elif [ "$x" = "-verbose" ] || [ "$x" = "-v" ]; then
         VERBOSE=enabled
         ACTION="rm -vf"


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/localepurge:master commit in: /
@ 2012-12-07 21:03 Wim Muskee
  0 siblings, 0 replies; 9+ messages in thread
From: Wim Muskee @ 2012-12-07 21:03 UTC (permalink / raw
  To: gentoo-commits

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 5775 bytes --]

commit:     5d75b6b326242749aa78dbc7b19716e2855a9229
Author:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
AuthorDate: Fri Dec  7 21:02:53 2012 +0000
Commit:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
CommitDate: Fri Dec  7 21:02:53 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/localepurge.git;a=commit;h=5d75b6b3

Man page refresh; option list, file list, add update locales description.

---
 localepurge.8 |  133 ++++++++++++++++++++++++++------------------------------
 1 files changed, 62 insertions(+), 71 deletions(-)

diff --git a/localepurge.8 b/localepurge.8
index bfcf3ee..fc9890b 100644
--- a/localepurge.8
+++ b/localepurge.8
@@ -1,95 +1,86 @@
 .TH LOCALEPURGE 8
 .SH NAME
 localepurge \- removing superfluous locale data
+
 .SH SYNOPSIS
 .B localepurge
 .br
+
 .SH "DESCRIPTION"
 .BR localepurge
 is a small script to recover disk space wasted for unneeded locale  
 files and localized man pages. It will be automagically invoked by 
-.BR emerge 
-some day... 
-You have to define the locale
-directory names you want to keep from removal
-in the 
-.BR /etc/locale.nopurge
+\fBemerge\fP some day... You have to define the locale directory 
+names you want to keep from removal in the \fB/etc/locale.nopurge\fP
 configuration file.
 .br
-Any other directory (or file) in 
-.BR /usr/share/locale
-not containing a subdirectory named
-.BR LC_MESSAGES
-will be discreetly ignored.
+Any other directory (or file) in \fB/usr/share/locale\fP not containing
+a subdirectory named \fBLC_MESSAGES\fP will be discreetly ignored.
+
 .SH OPTIONS
 The configurable options consist of toggling verbose output, reporting a
 summary of freed space, and deletion of localized manual pages in
-addition to locale files.  All actions are specified in the
-.BR /etc/locale.nopurge 
-configuration file. 
-For detailed debugging the commandline switch 
-.BR -debug 
-or just a short
-.BR -d
-instead are available for usage.
-For verbose output the commandline switch 
-.BR -verbose
-or just a short
-.BR -v
-can be added. You can use too
-.BR -help
-to have help ;) or a short 
-.BR -h.
-You can use too
-.BR -version
-and if you dont like colors you can use
-.BR -nocolor
-or the short form
-.BR -nc
-if you want a pretend mode you can use
-.BR -pretend
-or the short from
-.BR -p
-enjoy.
+addition to locale files. Some actions can be specified in the
+\fB/etc/locale.nopurge\fP configuration file.
+
+.IP "\fB\-u\fP \fB\-update\fP" 8
+Update the used localelist. 
+
+.IP "\fB\-d\fP \fB\-debug\fP" 8
+Enable detailed debugging.
+
+.IP "\fB\-p\fP \fB\-pretend\fP" 8
+Lists the files that would be removed when not pretending.
+
+.IP "\fB\-v\fP \fB\-verbose\fP" 8
+Enable verbose output.
+
+.IP "\fB\-h\fP \fB\-help\fP" 8
+Output all options.
+
+.IP "\fB\-nc\fP \fB\-nocolor\fP" 8
+Disables the use of colors in the output.
+
+.IP "\fB\-version\fP" 8
+Outputs the installed version.
 
 .SH "A Word of CAUTION"
-Please note, that 
-.BR this
-.BR tool
-.BR is
-.BR a
-.BR hack
-.BR which
-.BR is
-.BR not
-.BR integrated
-.BR with
-.BR Gentoo
-.BR Portage
-.BR system 
-and therefore is not meant for the faint of heart.  Responsibility for its 
-usage and possible breakage of your system therefore lies in the sysadmin's 
-(your) hands.
+Please note, that \fBthis tool is a hack which is not integrated with the 
+Gentoo Portage system\fP and therefore is not meant for the faint of heart. 
+Responsibility for its usage and possible breakage of your system therefore
+lies in the sysadmin's (your) hands.
 .br
 Please definitely do abstain from reporting any bugs blaming localepurge if 
-.BR you
-break your system by using it. If you don't know what you are doing and 
-can't handle any resulting breakage on your own then please simply don't 
+\fByou\fP break your system by using it. If you don't know what you are doing
+and can't handle any resulting breakage on your own then please simply don't 
 use it.
 .br
 All locale directories containing a subdirectory named LC_MESSAGES
-which are either commented out or not even listed at all in
-.BR /etc/locale.nopurge 
-will be irreversibly deleted.  The only way to
-reinstall any lost locales is "remerging"
-the ebuild.
+which are either commented out or not even listed at all in \fB/etc/locale.nopurge\fP
+will be irreversibly deleted. The only way to reinstall any lost locales is
+"remerging" the ebuild.
+
 .SH FILES
-.BR /etc/locale.nopurge
-.SH SEE ALSO
+.IP "\fB/etc/locale.nopurge\fP" 8
+This is the main configuration file. You can set the localedirs to check
+and locales to keep. Also configure some of the available options.
+
+.IP "\fB/var/cache/localepurge/localelist\fP" 8
+This file contains all locales that can potentially be removed. If this
+file does not exist, don't worry, it will be made when localepurge runs
+for the first time or by updating the localelist. 
+
+.IP "\fB/var/cache/localepurge/localelist-glibc\fP" 8
+This file is generated using the \fB/usr/share/i18n/SUPPORTED\fP file
+from glibc and contains all locales that can be used by localepurge.
+This file is also generated when starting for the first time or updating
+the localelist.
+
+.IP "\fB/var/cache/localepurge/localelist-extra\fP" 8
+This packaged file contains locales that can be installed on the system,
+but are not in localelist-glibc.
+
 .SH AUTHOR
-.BR localepurge
-and its accompanying manual page was written for the 
-.BR Gentoo 
-.BR Linux 
-system by José Alberto Suárez López. Based in the grat job for Debian
-GNU/Linux of Paul Seelig <pseelig@debian.org>. 
+\fBlocalepurge\fP and its accompanying manual page was written for the 
+\fBGentoo Linux\fP system by Jos� Alberto Su�rez L�pez. Based in the great 
+job for Debian GNU/Linux of Paul Seelig <pseelig@debian.org>.


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/localepurge:master commit in: /
@ 2013-01-15 17:46 Wim Muskee
  0 siblings, 0 replies; 9+ messages in thread
From: Wim Muskee @ 2013-01-15 17:46 UTC (permalink / raw
  To: gentoo-commits

commit:     ca912c79103dbc4a7dc3b4729ba6e33258fb05c6
Author:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
AuthorDate: Tue Jan 15 17:46:29 2013 +0000
Commit:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
CommitDate: Tue Jan 15 17:46:29 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/localepurge.git;a=commit;h=ca912c79

Fix crash when cleared size = 0 (#452208).

---
 localepurge |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/localepurge b/localepurge
index e4699f9..fc06c7f 100755
--- a/localepurge
+++ b/localepurge
@@ -297,7 +297,7 @@ done
 
 # Calculating and reporting total disk space freed:
 if [ "$SHOWFREEDSPACE" = "enabled" ]; then
-    let TOTAL=$LOCALETOTAL+$MANTOTAL
+    TOTAL=$(($LOCALETOTAL + $MANTOTAL))
     if test $TOTAL -lt 0; then
         TOTAL=0
     fi


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-01-15 17:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-05 17:04 [gentoo-commits] proj/localepurge:master commit in: / Wim Muskee
  -- strict thread matches above, loose matches on Subject: below --
2013-01-15 17:46 Wim Muskee
2012-12-07 21:03 Wim Muskee
2012-12-07 19:51 Wim Muskee
2012-12-07 19:26 Wim Muskee
2012-12-05 17:45 Wim Muskee
2012-12-05 17:45 Wim Muskee
2012-12-04 21:11 Wim Muskee
2012-12-04 21:11 Wim Muskee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox