Commit 4234a1e9 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Support symlinked libraries

parent 72cb819e
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -43,9 +43,15 @@ missing() {
}

copy() {
	local dest=${STAGE:=$DEFAULT_STAGE}/$(dirname $1)
	test -e ${STAGE:=$DEFAULT_STAGE}/$1 && return
	local dest=$STAGE/$(dirname $1)
	mkdir -p $dest
	cp -n $1 $dest/
	if [[ -h $1 ]]; then
		ln -s $(readlink $1) $dest/$(basename $1)
		copy $(readlink -f $1) $dest
	else
		cp $1 $dest/
	fi
}

trap missing EXIT