mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 18:12:55 +01:00
Support using OS other than Debian as base for custom images
Signed-off-by: Balasankar "Balu" C <balasankar@gitlab.com>
This commit is contained in:
parent
703c30315e
commit
0dea43ac3b
14 changed files with 345 additions and 226 deletions
|
|
@ -1,42 +1,52 @@
|
|||
#!/bin/bash
|
||||
# This script installs noto color emoji
|
||||
|
||||
apt-get update
|
||||
apt-get install unzip
|
||||
function build_debian() {
|
||||
apt-get update
|
||||
apt-get install unzip
|
||||
|
||||
cat > ~/.fonts.conf << EOM
|
||||
<?xml version='1.0'?>
|
||||
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||
<fontconfig>
|
||||
<match target="scan">
|
||||
<test name="family">
|
||||
<string>Noto Color Emoji</string>
|
||||
</test>
|
||||
<edit name="scalable" mode="assign"><bool>true</bool></edit>
|
||||
</match>
|
||||
<match target="pattern">
|
||||
<test name="prgname">
|
||||
<string>chrome</string>
|
||||
</test>
|
||||
<edit name="family" mode="prepend_first">
|
||||
<string>Noto Color Emoji</string>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
||||
cat > ~/.fonts.conf << EOM
|
||||
<?xml version='1.0'?>
|
||||
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||
<fontconfig>
|
||||
<match target="scan">
|
||||
<test name="family">
|
||||
<string>Noto Color Emoji</string>
|
||||
</test>
|
||||
<edit name="scalable" mode="assign"><bool>true</bool></edit>
|
||||
</match>
|
||||
<match target="pattern">
|
||||
<test name="prgname">
|
||||
<string>chrome</string>
|
||||
</test>
|
||||
<edit name="family" mode="prepend_first">
|
||||
<string>Noto Color Emoji</string>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
||||
EOM
|
||||
|
||||
mkdir setup_fonts
|
||||
cd setup_fonts
|
||||
curl https://noto-website-2.storage.googleapis.com/pkgs/NotoColorEmoji-unhinted.zip -LO
|
||||
unzip NotoColorEmoji-unhinted.zip
|
||||
mkdir setup_fonts
|
||||
cd setup_fonts
|
||||
curl https://noto-website-2.storage.googleapis.com/pkgs/NotoColorEmoji-unhinted.zip -LO
|
||||
unzip NotoColorEmoji-unhinted.zip
|
||||
|
||||
mkdir -p /usr/local/share/fonts
|
||||
cp NotoColorEmoji.ttf /usr/local/share/fonts/
|
||||
ls -la /usr/local/share/fonts/
|
||||
chmod 644 /usr/local/share/fonts/NotoColorEmoji.ttf
|
||||
mkdir -p /usr/local/share/fonts
|
||||
cp NotoColorEmoji.ttf /usr/local/share/fonts/
|
||||
ls -la /usr/local/share/fonts/
|
||||
chmod 644 /usr/local/share/fonts/NotoColorEmoji.ttf
|
||||
|
||||
fc-cache -fv
|
||||
fc-cache -fv
|
||||
|
||||
cd ..
|
||||
rm -r setup_fonts
|
||||
apt-get clean -yqq && rm -rf /var/lib/apt/lists/*
|
||||
cd ..
|
||||
rm -r setup_fonts
|
||||
apt-get clean -yqq && rm -rf /var/lib/apt/lists/*
|
||||
}
|
||||
|
||||
BUILD_OS=${BUILD_OS:-debian}
|
||||
|
||||
if [[ $BUILD_OS =~ debian ]]; then
|
||||
build_debian "$@"
|
||||
elif [[ $BUILD_OS =~ ubi ]]; then
|
||||
build_ubi "$@"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue