summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2011-12-07 16:37:24 +0000
committerPhil Blundell <philb@gnu.org>2011-12-07 16:37:24 +0000
commitfcf525654915edb9650f1a6c2852f336366f8b2f (patch)
treec81d8985df69331c172d01987d2847fc5bc9ccc4
parent6e1e53bf2094deb30736b257f7f43f91e0d36ffa (diff)
downloadmeta-micro-fcf525654915edb9650f1a6c2852f336366f8b2f.tar.gz
rm_old_work: new class
-rw-r--r--classes/rm_old_work.bbclass15
1 files changed, 15 insertions, 0 deletions
diff --git a/classes/rm_old_work.bbclass b/classes/rm_old_work.bbclass
new file mode 100644
index 0000000..64247ab
--- /dev/null
+++ b/classes/rm_old_work.bbclass
@@ -0,0 +1,15 @@
+WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
+
+do_rm_old_works() {
+ subdir="${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}"
+ if [ -d "$subdir" ]; then
+ for v in `ls $subdir`; do
+ if [ "$subdir/$v" != "${WORKDIR}" ]; then
+ echo "Deleting old work dir $v"
+ rm -rf $subdir/$v
+ fi
+ done
+ fi
+}
+
+addtask rm_old_works before do_unpack