aboutsummaryrefslogtreecommitdiffstats
path: root/classes/src_distribute_local.bbclass
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /classes/src_distribute_local.bbclass
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
downloadopenembedded-c8e5702127e507e82e6f68a4b8c546803accea9d.tar.gz
import clean BK tree at cset 1.3670
Diffstat (limited to 'classes/src_distribute_local.bbclass')
-rw-r--r--classes/src_distribute_local.bbclass31
1 files changed, 31 insertions, 0 deletions
diff --git a/classes/src_distribute_local.bbclass b/classes/src_distribute_local.bbclass
index e69de29bb2..5f0cef5bec 100644
--- a/classes/src_distribute_local.bbclass
+++ b/classes/src_distribute_local.bbclass
@@ -0,0 +1,31 @@
+inherit src_distribute
+
+# SRC_DIST_LOCAL possible values:
+# copy copies the files from ${A} to the distributedir
+# symlink symlinks the files from ${A} to the distributedir
+# move+symlink moves the files into distributedir, and symlinks them back
+SRC_DIST_LOCAL ?= "move+symlink"
+SRC_DISTRIBUTEDIR ?= "${DEPLOY_DIR}/sources"
+SRC_DISTRIBUTECOMMAND () {
+ s="${SRC}"
+ if [ ! -L "$s" ] && (echo "$s"|grep "^${DL_DIR}"); then
+ :
+ else
+ exit 0;
+ fi
+ mkdir -p ${SRC_DISTRIBUTEDIR}
+ case "${SRC_DIST_LOCAL}" in
+ copy)
+ test -e $s.md5 && cp -f $s.md5 ${SRC_DISTRIBUTEDIR}/
+ cp -f $s ${SRC_DISTRIBUTEDIR}/
+ ;;
+ symlink)
+ test -e $s.md5 && ln -sf $s.md5 ${SRC_DISTRIBUTEDIR}/
+ ln -sf $s ${SRC_DISTRIBUTEDIR}/
+ ;;
+ move+symlink)
+ mv $s ${SRC_DISTRIBUTEDIR}/
+ ln -sf ${SRC_DISTRIBUTEDIR}/`basename $s` $s
+ ;;
+ esac
+}