File tree Expand file tree Collapse file tree 1 file changed +27
-6
lines changed Expand file tree Collapse file tree 1 file changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -128,19 +128,40 @@ cargo_do_compile() {
128128}
129129
130130cargo_do_install () {
131- install -d "${CARGO_INSTALL_DIR} "
132131 if [ "${CARGO_BUILD_TYPE} " = "--release" ]; then
133132 local cargo_bindir = "${CARGO_RELEASE_DIR} "
134133 else
135134 local cargo_bindir = "${CARGO_DEBUG_DIR} "
136135 fi
137136
138137 local files_installed = ""
139- for f in "$cargo_bindir" /*; do
140- if [ -f "$f" ] && [ -x "$f" ]; then
141- install -m 0755 "$f" "${CARGO_INSTALL_DIR} "
142- files_installed = "$files_installed $f"
143- fi
138+
139+ for tgt in "${cargo_bindir} " /*; do
140+ case $tgt in
141+ *. so |*. rlib )
142+ install -d "${D}${libdir} "
143+ install -m755 "$tgt" "${D}${libdir} "
144+ files_installed = "$files_installed $tgt"
145+ ;;
146+ *examples )
147+ if [ -d "$tgt" ]; then
148+ for example in "$tgt/" *; do
149+ if [ -f "$example" ] && [ -x "$example" ]; then
150+ install -d "${CARGO_INSTALL_DIR} "
151+ install -m755 "$example" "${CARGO_INSTALL_DIR} "
152+ files_installed = "$files_installed $example"
153+ fi
154+ done
155+ fi
156+ ;;
157+ *)
158+ if [ -f "$tgt" ] && [ -x "$tgt" ]; then
159+ install -d "${CARGO_INSTALL_DIR} "
160+ install -m755 "$tgt" "${CARGO_INSTALL_DIR} "
161+ files_installed = "$files_installed $tgt"
162+ fi
163+ ;;
164+ esac
144165 done
145166
146167 if [ -z "$files_installed" ]; then
You can’t perform that action at this time.
0 commit comments