Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions tools/debian_buildenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,41 @@ case "$1" in
fi

# Install a faster linker. Prefer mold, fall back to lld
if apt-cache show mold 2>%1 >/dev/null;
if apt-cache show mold 2>/dev/null >/dev/null;
then
sudo apt-get install -y --no-install-recommends mold
else
if apt-cache show lld 2>%1 >/dev/null;
if apt-cache show lld 2>/dev/null >/dev/null;
then
sudo apt-get install -y --no-install-recommends lld
fi
fi

# Check if fonts-ubuntu is available (from non-free repository)
if ! apt-cache show fonts-ubuntu 2>/dev/null | grep -q "Package: fonts-ubuntu"; then
echo ""
echo "⚠️ WARNING: The package 'fonts-ubuntu' is not available."
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not use such an eye candy yet:

Suggested change
echo "⚠️ WARNING: The package 'fonts-ubuntu' is not available."
echo "WARNING: The package 'fonts-ubuntu' is not available."

echo "This package is required for Mixxx and is located in the Debian non-free repository."
echo ""
read -p "Do you want to enable the non-free repository and install fonts-ubuntu? (y/n) " -n 1 -r
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the users system like that makes me nervous. This may work now but may break any system that is no longe like we expect.

Can you replace that with a brief hint how to fix the situation, like linking to the official Debian Wiki https://wiki.debian.org/SourcesList and than just ask here if the user wants to continue anyway or recall the script later.

echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Enabling non-free repository..."
# Add non-free to sources.list if not already present
if ! grep -q " non-free$" /etc/apt/sources.list; then
sudo sed -i 's/^\(deb.*\) \(main\|contrib\|non-free-firmware\)$/\1 \2 non-free/' /etc/apt/sources.list
fi
echo "Updating package list..."
sudo apt-get update
FONTS_UBUNTU_AVAILABLE=true
else
echo "Continuing without fonts-ubuntu..."
FONTS_UBUNTU_AVAILABLE=false
fi
else
FONTS_UBUNTU_AVAILABLE=true
fi

sudo apt-get install -y --no-install-recommends -- \
ccache \
cmake \
Expand All @@ -72,7 +97,7 @@ case "$1" in
docbook-to-man \
dput \
fonts-open-sans \
fonts-ubuntu \
$([ "$FONTS_UBUNTU_AVAILABLE" = true ] && echo "fonts-ubuntu") \
g++ \
lcov \
libavformat-dev \
Expand Down