Skip to content

Commit

Permalink
Timezone & sh stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
malwarepad committed Aug 27, 2024
1 parent 8943e73 commit a895c8c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ src/bootloader/limine
src/bootloader/.version

# Misc (on the target system)
target/etc/localtime
target/usr/share

pci.ids
Expand Down
18 changes: 13 additions & 5 deletions tools/userland/ports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ if [ ! -d "$USR_PATHNAME/../bin" ]; then
fi
cd "$USR_PATHNAME/../../"

# Make sure we use GNU bash for our /bin/sh
if [ ! -f "$USR_PATHNAME/bin/sh" ]; then
ln -s bash "$USR_PATHNAME/bin/sh"
fi

# Make sure we are using the correct timezone
HOST_TIMEZONE=$(readlink -f /etc/localtime)
TARGET_TIMEZONE=$(readlink -f "$USR_PATHNAME/../etc/localtime" || echo definitely_not_lol)
if [ "${HOST_TIMEZONE}" != "${TARGET_TIMEZONE}" ]; then
rm -f "$TARGET_TIMEZONE"
ln -s "$HOST_TIMEZONE" "$TARGET_TIMEZONE"
fi

# GNU ncurses (useful library)
if [ ! -f "$USR_PATHNAME/bin/clear" ]; then
build_package_autotools https://ftp.gnu.org/gnu/ncurses/ncurses-6.5.tar.gz "/usr" config.sub "--with-build-sysroot='$USR_PATHNAME' --with-sysroot=/" "" "DESTDIR='$USR_PATHNAME/../'"
Expand Down Expand Up @@ -134,11 +147,6 @@ source "${SCRIPTPATH}/../shared/chroot.sh"
chroot_establish
cd "$USR_PATHNAME/../"

# Make sure we use GNU bash for our /bin/sh
if [ ! -f "$USR_PATHNAME/bin/sh" ]; then
sudo chroot "$TARGET_DIR/" /usr/bin/bash -c "ln -s bash /usr/bin/sh"
fi

# The netwide assembler (nasm)
if [ ! -f "$USR_PATHNAME/bin/nasm" ]; then
wget -nc https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.xz
Expand Down

0 comments on commit a895c8c

Please sign in to comment.