aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Edgar <rocket@gentoo.org>2005-07-18 15:12:00 +0000
committerEric Edgar <rocket@gentoo.org>2005-07-18 15:12:00 +0000
commit6fd6712d41b35d440d2198e4e4f5063162a6ccae (patch)
treee10ed1fba4923b92db505fd0ba2fe0c18c950cc2 /gen_funcs.sh
parentFix #98886. (diff)
downloadgenkernel-6fd6712d41b35d440d2198e4e4f5063162a6ccae.tar.gz
genkernel-6fd6712d41b35d440d2198e4e4f5063162a6ccae.tar.bz2
genkernel-6fd6712d41b35d440d2198e4e4f5063162a6ccae.zip
Create additional cleanup options. --postclear for final cleanup and 2 new genkernel.conf options. Also fixup TEMP dir creation and extraneous %%ARCH%% creation in the cache_dir
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@267 67a159dc-881f-0410-a524-ba9dfbe2cb84
Diffstat (limited to 'gen_funcs.sh')
-rwxr-xr-xgen_funcs.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/gen_funcs.sh b/gen_funcs.sh
index 3512551..21d35f3 100755
--- a/gen_funcs.sh
+++ b/gen_funcs.sh
@@ -250,3 +250,22 @@ isBootRO()
done
return 1
}
+
+setup_cache_dir()
+{
+
+[ ! -d "${CACHE_DIR}" ] && mkdir -p "${CACHE_DIR}"
+
+if [ "${CLEAR_CACHE_DIR}" == 'yes' ]
+then
+ print_info 1 "Clearing cache dir contents from ${CACHE_DIR}"
+ CACHE_DIR_CONTENTS=`ls ${CACHE_DIR}|grep -v CVS|grep -v cpio|grep -v README`
+ for i in ${CACHE_DIR_CONTENTS}
+ do
+ print_info 1 " >> removing ${i}"
+ rm ${CACHE_DIR}/${i}
+ done
+fi
+
+}
+