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() {
128
128
}
129
129
130
130
cargo_do_install () {
131
- install -d "${CARGO_INSTALL_DIR} "
132
131
if [ "${CARGO_BUILD_TYPE} " = "--release" ]; then
133
132
local cargo_bindir = "${CARGO_RELEASE_DIR} "
134
133
else
135
134
local cargo_bindir = "${CARGO_DEBUG_DIR} "
136
135
fi
137
136
138
137
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
144
165
done
145
166
146
167
if [ -z "$files_installed" ]; then
You can’t perform that action at this time.
0 commit comments