diff options
| author | Frans Meulenbroeks <fransmeulenbroeks@yahoo.com> | 2005-11-05 21:50:06 +0000 |
|---|---|---|
| committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-11-05 21:50:06 +0000 |
| commit | 594cd366a214b9ea8f7ed52eb7f4635a393f48a5 (patch) | |
| tree | d0d22e466d06421e9972cd9027569b54924b18d3 /classes/src_distribute_local.bbclass | |
| parent | 7adabd7dffa510d614b4a681c912909b354c1ed6 (diff) | |
| parent | 3eeaa7051df89f3241f6420d22aa919001376e39 (diff) | |
merge of 21d66a92293faf76a506c7d17e3cd16e143bb401
and 70f8ac179abbb777f1bec20edf02530820b33e92
Diffstat (limited to 'classes/src_distribute_local.bbclass')
| -rw-r--r-- | classes/src_distribute_local.bbclass | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/classes/src_distribute_local.bbclass b/classes/src_distribute_local.bbclass new file mode 100644 index 0000000000..5f0cef5bec --- /dev/null +++ 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 +} |
