3 # (C) Copyright 2009 Red Hat Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 # Written by Richard W.M. Jones <rjones@redhat.com>
23 --long help,all,none,keep-locales,drop-locales,keep-docs,drop-docs,keep-yum-cache,drop-yum-cache,keep-cracklib,drop-cracklib,keep-i18n,drop-i18n,keep-zoneinfo,drop-zoneinfo \
24 -n febootstrap-minimize -- "$@"`
26 echo "febootstrap-minimize: problem parsing the command line arguments"
55 echo "Usage: febootstrap-minimize [--options] DIR"
56 echo "Please read febootstrap-minimize(8) man page for more information."
110 echo "Internal error!"
115 if [ $# -lt 1 ]; then
122 #----------------------------------------------------------------------
124 if [ ! -d "$target" ]; then
125 echo "febootstrap-minimize: $target: target directory not found"
131 if [ "$keep_locales" != "yes" ]; then
132 rm -f "$target"/usr/lib/locale/*
133 rm -rf "$target"/usr/share/locale
136 if [ "$keep_docs" != "yes" ]; then
137 rm -rf "$target"/usr/share/man
138 rm -rf "$target"/usr/share/doc
141 if [ "$keep_yum_cache" != "yes" ]; then
142 rm -rf "$target"/var/cache/yum/*
145 if [ "$keep_cracklib" != "yes" ]; then
146 rm -rf "$target"/usr/share/cracklib
149 if [ "$keep_i18n" != "yes" ]; then
150 rm -rf "$target"/usr/share/i18n
153 if [ "$keep_zoneinfo" != "yes" ]; then
154 mv "$target"/usr/share/zoneinfo/{UCT,UTC,Universal,Zulu,GMT*,*.tab} \
156 rm -rf "$target"/usr/share/zoneinfo/*
157 mv "$target"/{UCT,UTC,Universal,Zulu,GMT*,*.tab} \
158 "$target"/usr/share/zoneinfo/