aboutsummaryrefslogtreecommitdiffstats
path: root/classes/rm_work.bbclass
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2005-02-01 14:07:09 +0000
committerMarcin Juszkiewicz <hrw@openembedded.org>2005-02-01 14:07:09 +0000
commitbcecf760317d7edfeb8d520b3e98bf061a6cea2e (patch)
treea638975b4907ccc36807c42c4440d557ca49ccf5 /classes/rm_work.bbclass
parent8f7aa0caadd94a443a5f52fcbf20a2b9314d7053 (diff)
downloadopenembedded-bcecf760317d7edfeb8d520b3e98bf061a6cea2e.tar.gz
openembedded-bcecf760317d7edfeb8d520b3e98bf061a6cea2e.tar.bz2
openembedded-bcecf760317d7edfeb8d520b3e98bf061a6cea2e.zip
Merge bk://oe-devel@oe-devel.bkbits.net/openembedded/
into marcinj.local:/home/hrw/zaurus/bb/openembedded 2005/02/01 15:06:52+01:00 local!hrw new version of rm_work.bbclass remove all subdirectories except "temp" (to keep logs in place) BKrev: 41ff8d0dGx2OTL_6r8ZeQpiPiDZ2aQ
Diffstat (limited to 'classes/rm_work.bbclass')
-rw-r--r--classes/rm_work.bbclass22
1 files changed, 22 insertions, 0 deletions
diff --git a/classes/rm_work.bbclass b/classes/rm_work.bbclass
index e69de29bb2..340446917e 100644
--- a/classes/rm_work.bbclass
+++ b/classes/rm_work.bbclass
@@ -0,0 +1,22 @@
+#
+# Removes source after build
+#
+# To use it add that line to conf/local.conf:
+#
+# INHERIT += "rm_work"
+#
+
+do_rm_work () {
+ cd ${WORKDIR}
+ for dir in *
+ do
+ if [ `basename ${S}` == $dir ]; then
+ rm -rf $dir/*
+ elif [ $dir != 'temp' ]; then
+ rm -rf $dir
+ fi
+ done
+}
+
+addtask rm_work before do_build
+addtask rm_work after do_package