Skip to content

Commit a96ffab

Browse files
authored
refactor(script): Remove redundant locales installation
1 parent 3d73ea4 commit a96ffab

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

02-configure-system.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#!/bin/bash
22
# ==============================================================================
3-
# LuminOS Build Script, Phase 2: System Configuration
3+
# LuminOS Build Script - Phase 2: System Configuration
44
#
55
# Author: Gabriel, Project Leader @ LuminOS
6-
# Version: 0.2.4
6+
# Version: 0.2.5
77
# ==============================================================================
8-
98
set -e
109
LUMINOS_CHROOT_DIR="chroot"
1110

@@ -20,7 +19,6 @@ cat > "$LUMINOS_CHROOT_DIR/tmp/configure.sh" << "EOF"
2019
#!/bin/bash
2120
set -e
2221
export DEBIAN_FRONTEND=noninteractive
23-
2422
echo "--> Configuring APT sources..."
2523
cat > /etc/apt/sources.list << "SOURCES"
2624
deb http://deb.debian.org/debian trixie main contrib non-free-firmware
@@ -38,14 +36,12 @@ echo "LuminOS" > /etc/hostname
3836
echo "--> Setting timezone to Europe/Zurich..."
3937
ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime
4038
41-
echo "--> Ensuring locales package is installed..."
42-
apt-get install -y locales
39+
# The redundant 'apt-get install locales' has been removed.
4340
4441
echo "--> Configuring locales..."
4542
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
4643
locale-gen
4744
update-locale LANG="en_US.UTF-8"
48-
4945
if [ "$CI" = "true" ]; then
5046
echo "--> CI environment detected. Setting dummy passwords..."
5147
echo "root:luminos-ci" | chpasswd
@@ -63,13 +59,10 @@ rm /tmp/configure.sh
6359
EOF
6460

6561
chmod +x "$LUMINOS_CHROOT_DIR/tmp/configure.sh"
66-
6762
echo "--> Mounting virtual filesystems for chroot..."
6863
mount --bind /dev "$LUMINOS_CHROOT_DIR/dev"; mount --bind /dev/pts "$LUMINOS_CHROOT_DIR/dev/pts"; mount -t proc /proc "$LUMINOS_CHROOT_DIR/proc"; mount -t sysfs /sys "$LUMINOS_CHROOT_DIR/sys"
69-
7064
echo "--> Entering chroot to perform configuration..."
7165
chroot "$LUMINOS_CHROOT_DIR" env -i PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CI="$CI" /tmp/configure.sh
72-
7366
echo "--> Unmounting virtual filesystems..."
7467
umount "$LUMINOS_CHROOT_DIR/sys"; umount "$LUMINOS_CHROOT_DIR/proc"; umount "$LUMINOS_CHROOT_DIR/dev/pts"; umount "$LUMINOS_CHROOT_DIR/dev"
7568

0 commit comments

Comments
 (0)