2005-08-31 10:45:47 +00:00
|
|
|
inherit src_distribute
|
|
|
|
|
|
|
|
# SRC_DIST_LOCAL possible values:
|
2011-10-17 13:04:43 +00:00
|
|
|
# copy copies the files to the distributedir
|
|
|
|
# symlink symlinks the files to the distributedir
|
2005-08-31 10:45:47 +00:00
|
|
|
# move+symlink moves the files into distributedir, and symlinks them back
|
|
|
|
SRC_DIST_LOCAL ?= "move+symlink"
|
2007-08-08 20:41:55 +00:00
|
|
|
SRC_DISTRIBUTEDIR ?= "${DEPLOY_DIR}/sources"
|
2005-08-31 10:45:47 +00:00
|
|
|
SRC_DISTRIBUTECOMMAND () {
|
|
|
|
s="${SRC}"
|
2011-10-17 13:04:43 +00:00
|
|
|
d="${DEST}"
|
|
|
|
|
2005-08-31 10:45:47 +00:00
|
|
|
mkdir -p ${SRC_DISTRIBUTEDIR}
|
2011-10-17 13:04:43 +00:00
|
|
|
|
|
|
|
if echo $d | grep -q '/$'; then
|
|
|
|
mkdir -p ${SRC_DISTRIBUTEDIR}/$d
|
|
|
|
fi
|
|
|
|
|
2005-08-31 10:45:47 +00:00
|
|
|
case "${SRC_DIST_LOCAL}" in
|
|
|
|
copy)
|
2011-10-17 13:04:43 +00:00
|
|
|
test -e $s.md5 && cp -f $s.md5 ${SRC_DISTRIBUTEDIR}/$d.md5
|
|
|
|
cp -f $s ${SRC_DISTRIBUTEDIR}/$d
|
2005-08-31 10:45:47 +00:00
|
|
|
;;
|
|
|
|
symlink)
|
2011-10-17 13:04:43 +00:00
|
|
|
test -e $s.md5 && ln -sf $s.md5 ${SRC_DISTRIBUTEDIR}/$d.md5
|
|
|
|
ln -sf $s ${SRC_DISTRIBUTEDIR}/$d
|
2005-08-31 10:45:47 +00:00
|
|
|
;;
|
|
|
|
move+symlink)
|
2011-10-17 13:04:43 +00:00
|
|
|
mv $s ${SRC_DISTRIBUTEDIR}/$d
|
|
|
|
ln -sf ${SRC_DISTRIBUTEDIR}/$d $s
|
2005-08-31 10:45:47 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|