Skip to content

Commit

Permalink
Using the file command did not work; rely on build enviroment instead
Browse files Browse the repository at this point in the history
  • Loading branch information
th-otto committed Apr 29, 2024
1 parent 1bb3783 commit 5c64368
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
# -u: Treat unset variables as an error when substituting.
# -x: Display expanded script commands

if test "$CROSS_TOOL" = ""; then
CROSS_TOOL=m68k-atari-mint
export CROSS_TOOL
fi

make SHELL=/bin/bash
make SHELL=/bin/bash DESTDIR="${INSTALL_DIR}" install

Expand All @@ -14,34 +19,25 @@ usr/sbin/zdump
usr/sbin/zic
"

if file ${INSTALL_DIR}/usr/sbin/zic | grep a.out; then
TARGET=m68k-atari-mint
elif file ${INSTALL_DIR}/usr/sbin/zic | grep ELF; then
TARGET=m68k-atari-mintelf
else
echo "unknown file format" >&2
exit 2
fi

rm -f tz/*.o
make -C tz DESTDIR="${INSTALL_DIR}" type=m68020 install
cd "${INSTALL_DIR}"
${TARGET}-strip $BINFILES
${CROSS_TOOL}-strip $BINFILES
tar cjf "${DEPLOY_DIR}/${ARCHIVE_NAME}-020.${DEPLOY_ARCHIVE} $BINFILES usr/share/zoneinfo
rm -f $BINFILES
cd -
rm -f tz/*.o
make -C tz DESTDIR="${INSTALL_DIR}" type=coldfire install
cd "${INSTALL_DIR}"
${TARGET}-strip $BINFILES
${CROSS_TOOL}-strip $BINFILES
tar cjf "${DEPLOY_DIR}/${ARCHIVE_NAME}-v4e.${DEPLOY_ARCHIVE} $BINFILES usr/share/zoneinfo
rm -f $BINFILES
cd -

rm -f tz/*.o
make -C tz DESTDIR="${INSTALL_DIR}" type=m68000 install
cd "${INSTALL_DIR}"
${TARGET}-strip $BINFILES
${CROSS_TOOL}-strip $BINFILES
tar cjf "${DEPLOY_DIR}/${ARCHIVE_NAME}-000.${DEPLOY_ARCHIVE} $BINFILES usr/share/zoneinfo
cd -

0 comments on commit 5c64368

Please sign in to comment.