########################################################
target_name="${1}"
-destination="${2}"
+destination="${2}/${1}"
# find specified target
TARGET_DIR="${BUILD_ARTIFACTS_DIR}/${target_name}"
sdb_shell rm -f "${rpm_path}"
done
-# push targets
-printf "\nPushing fuzzing targets to device...\n"
-
+# turn off root mode if required
if (( ROOT != 1 )); then
${SDB_CMD} root off >/dev/null
fi
-sdb_shell mkdir -p "${destination}"
+# push targets
+printf "\nPushing fuzzing targets to device...\n"
+
for target_bin in $(find "${TARGET_DIR}/${ARCH}/target" -type f); do
echo "${target_bin}"
-
- ${SDB_CMD} push "${target_bin}" "${destination}" >/dev/null
+ sdb_shell_wrap mkdir -p "${destination}/${target_bin}"
+ ${SDB_CMD} push "${target_bin}" "${destination}/${target_bin}/" >/dev/null
done