Skip to content

Commit

Permalink
technologic/board: update IR tar commands to follow symlinks
Browse files Browse the repository at this point in the history
Fixes #45

Signed-off-by: Kris Bahnsen <[email protected]>
  • Loading branch information
ts-kris committed Nov 15, 2023
1 parent 15ccd28 commit 7540041
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion technologic/board/ts7100-usbprod/scripts/post-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cp "${COMM_SCRIPTS}/sanitize_linux_rootfs.sh" "${TEMPDIR}/"
rm -f ${TAR_PATH}* ${IMG_PATH}*

# Create output files
tar cf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
tar chf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
md5sum "${TAR_DATE_PATH}.tar" > "${TAR_DATE_PATH}.tar.md5"
xz -2 "${TAR_DATE_PATH}.tar"
ln -sf "${TAR_BASE}-${DATE}.tar.xz" "${TAR_PATH}.tar.xz"
Expand Down
2 changes: 1 addition & 1 deletion technologic/board/ts7250v3-usbprod/scripts/post-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cp "${COMM_SCRIPTS}/sanitize_linux_rootfs.sh" "${TEMPDIR}/"
rm -f ${TAR_PATH}* ${IMG_PATH}*

# Create output files
tar cf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
tar chf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
md5sum "${TAR_DATE_PATH}.tar" > "${TAR_DATE_PATH}.tar.md5"
xz -2 "${TAR_DATE_PATH}.tar"
ln -sf "${TAR_BASE}-${DATE}.tar.xz" "${TAR_PATH}.tar.xz"
Expand Down
2 changes: 1 addition & 1 deletion technologic/board/ts7800v2-usbprod/scripts/post-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cp "${COMM_SCRIPTS}/sanitize_linux_rootfs.sh" "${TEMPDIR}/"
rm -f ${TAR_PATH}* ${IMG_PATH}*

# Create output files
tar cf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
tar chf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
md5sum "${TAR_DATE_PATH}.tar" > "${TAR_DATE_PATH}.tar.md5"
xz -2 "${TAR_DATE_PATH}.tar"
ln -sf "${TAR_BASE}-${DATE}.tar.xz" "${TAR_PATH}.tar.xz"
Expand Down
2 changes: 1 addition & 1 deletion technologic/board/tsa38x-usbprod/scripts/post-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cp "${COMM_SCRIPTS}/sanitize_linux_rootfs.sh" "${TEMPDIR}/"
rm -f ${TAR_PATH}* ${IMG_PATH}*

# Create output files
tar cf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
tar chf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
md5sum "${TAR_DATE_PATH}.tar" > "${TAR_DATE_PATH}.tar.md5"
xz -2 "${TAR_DATE_PATH}.tar"
ln -sf "${TAR_BASE}-${DATE}.tar.xz" "${TAR_PATH}.tar.xz"
Expand Down
2 changes: 1 addition & 1 deletion technologic/board/tsimx28-usbprod/scripts/post-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cp "${COMM_SCRIPTS}/sanitize_linux_rootfs.sh" "${TEMPDIR}/"
rm -f ${TAR_PATH}* ${IMG_PATH}*

# Create output files
tar cf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
tar chf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
md5sum "${TAR_DATE_PATH}.tar" > "${TAR_DATE_PATH}.tar.md5"
xz -2 "${TAR_DATE_PATH}.tar"
ln -sf "${TAR_BASE}-${DATE}.tar.xz" "${TAR_PATH}.tar.xz"
Expand Down
2 changes: 1 addition & 1 deletion technologic/board/tsimx6-usbprod/scripts/post-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cp "${COMM_SCRIPTS}/sanitize_linux_rootfs.sh" "${TEMPDIR}/"
rm -f ${TAR_PATH}* ${IMG_PATH}*

# Create output files
tar cf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
tar chf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
md5sum "${TAR_DATE_PATH}.tar" > "${TAR_DATE_PATH}.tar.md5"
xz -2 "${TAR_DATE_PATH}.tar"
ln -sf "${TAR_BASE}-${DATE}.tar.xz" "${TAR_PATH}.tar.xz"
Expand Down
2 changes: 1 addition & 1 deletion technologic/board/tsimx6ul-usbprod/scripts/post-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cp "${COMM_SCRIPTS}/sanitize_linux_rootfs.sh" "${TEMPDIR}/"
rm -f ${TAR_PATH}* ${IMG_PATH}*

# Create output files
tar cf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
tar chf "${TAR_DATE_PATH}.tar" -C "${TEMPDIR}" .
md5sum "${TAR_DATE_PATH}.tar" > "${TAR_DATE_PATH}.tar.md5"
xz -2 "${TAR_DATE_PATH}.tar"
ln -sf "${TAR_BASE}-${DATE}.tar.xz" "${TAR_PATH}.tar.xz"
Expand Down
6 changes: 3 additions & 3 deletions technologic/board/usbprod-common/scripts/blast_funcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ untar_image() {
# Get the correct command to stream decompress the tarball
# and run it
CMD=$(get_stream_decomp "${SRC_TARBALL}")
${CMD} "${SRC_TARBALL}" | tar -x -C "${DST_MOUNT}" || \
${CMD} "${SRC_TARBALL}" | tar -xh -C "${DST_MOUNT}" || \
err_exit "untar ${DST_DEV}"

sync
Expand Down Expand Up @@ -372,7 +372,7 @@ capture_img_or_tar_from_disk() {
# Copy source disk filesystem to our sparse file backed
# mount location. Use tar pipeline to ensure EVERY file
# property, permission, etc, is coped intact
tar -cf - -C "${TMP_SRC_DIR}"/ . | tar x -C "${TMP_DIR}" \
tar -chf - -C "${TMP_SRC_DIR}"/ . | tar xh -C "${TMP_DIR}" \
|| err_exit "copy SRC contents to TMP DST"

# Unmount the SRC disk, we should no longer need this.
Expand Down Expand Up @@ -408,7 +408,7 @@ capture_img_or_tar_from_disk() {
# as opposed to a whole disk image to save time and space.
if [ ${PART_CNT} -eq 1 ]; then
echo "Creating compressed tarball"
tar cf "${DST_TAR}" -C "${TMP_DIR}"/ . || \
tar chf "${DST_TAR}" -C "${TMP_DIR}"/ . || \
err_exit "tar create ${TAR}"
# This two-step is needed, and repeated, because we want
# the .md5 file to not have any relative paths
Expand Down

0 comments on commit 7540041

Please sign in to comment.