Refactor build-toolchain.sh to improve toolchain archiving process
- Created a dedicated directory for the target toolchain within the temporary working directory. - Copied the environment script to the working directory for inclusion in the archive. - Updated the tar command to include the target directory and environment script in the final archive, enhancing organization and clarity.
This commit is contained in:
@@ -217,10 +217,14 @@ cd "${TOP}"
|
||||
WDIR=$(mktemp -d)
|
||||
trap 'rm -rf "$WDIR"' EXIT
|
||||
|
||||
cp -a "${INSTALL_DIR}"/* "$WDIR"/
|
||||
find "$WDIR" -type f -executable -exec strip -p {} \; 2>/dev/null || true
|
||||
ARCHIVE_TOOLCHAIN_DIR="${WDIR}/${TARGET}"
|
||||
mkdir -p "${ARCHIVE_TOOLCHAIN_DIR}"
|
||||
cp -a "${INSTALL_DIR}"/* "${ARCHIVE_TOOLCHAIN_DIR}/"
|
||||
cp -a "${TOP}/env.sh" "${WDIR}/env.sh"
|
||||
|
||||
tar -C "$WDIR" --owner=0 --group=0 -cJf "toolset-jlv-${SUBARCH}-gcc${GCC_VER}-uclibc${UCLIBC_VER}.tar.xz" .
|
||||
find "${ARCHIVE_TOOLCHAIN_DIR}" -type f -executable -exec strip -p {} \; 2>/dev/null || true
|
||||
|
||||
tar -C "$WDIR" --owner=0 --group=0 -cJf "toolset-jlv-${SUBARCH}-gcc${GCC_VER}-uclibc${UCLIBC_VER}.tar.xz" "${TARGET}" "env.sh"
|
||||
echo "Готово: toolset-jlv-${SUBARCH}-gcc${GCC_VER}-uclibc${UCLIBC_VER}.tar.xz"
|
||||
|
||||
# ==================================================================
|
||||
|
||||
Reference in New Issue
Block a user