Merge bk://oe-devel@oe-devel.bkbits.net/openembedded/
authorMarcin Juszkiewicz <hrw@openembedded.org>
Tue, 1 Feb 2005 14:07:09 +0000 (14:07 +0000)
committerMarcin Juszkiewicz <hrw@openembedded.org>
Tue, 1 Feb 2005 14:07:09 +0000 (14:07 +0000)
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

classes/rm_work.bbclass

index e69de29..3404469 100644 (file)
@@ -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