buildbrain/os-brainux/setup_brainux.sh

75 lines
2.5 KiB
Bash
Raw Normal View History

2020-09-28 00:49:26 +09:00
#!/bin/bash
2021-03-21 19:03:29 +09:00
set -uex -o pipefail
2020-09-28 00:49:26 +09:00
TIMEZONE="Asia/Tokyo"
/debootstrap/debootstrap --second-stage
2021-02-20 04:29:49 +09:00
if [ "${CI}" == "true" ]; then
REPO=deb.debian.org
REPO_SECURITY=deb.debian.org
else
REPO=localhost:65432
REPO_SECURITY=localhost:65433
fi
2020-09-28 00:49:26 +09:00
cat <<EOF > /etc/apt/sources.list
2021-02-20 04:29:49 +09:00
deb http://${REPO}/debian buster main contrib non-free
deb-src http://${REPO}/debian buster main contrib non-free
deb http://${REPO}/debian buster-updates main contrib non-free
deb-src http://${REPO}/debian buster-updates main contrib non-free
deb http://${REPO_SECURITY}/debian-security buster/updates main contrib non-free
deb-src http://${REPO_SECURITY}/debian-security buster/updates main contrib non-free
2020-09-28 00:49:26 +09:00
EOF
cat <<EOF > /etc/apt/apt.conf.d/90-norecommend
APT::Install-Recommends "0";
APT::Install-Suggests "0";
EOF
apt update -y
apt install -y locales
echo "$TIMEZONE" > /etc/timezone && \
dpkg-reconfigure -f noninteractive tzdata && \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_us.UTF-8 UTF-8/' /etc/locale.gen && \
echo 'LANG="en_US.UTF-8"' > /etc/default/locale && \
dpkg-reconfigure -f noninteractive locales && \
update-locale LANG=en_US.UTF-8
echo "brain" > /etc/hostname
echo root:root | chpasswd
cat <<EOF >> /etc/securetty
ttymxc0
EOF
DEBIAN_FRONTEND=noninteractive \
apt install -y dialog sudo \
libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev \
xserver-xorg xserver-xorg-video-fbdev xserver-xorg-dev xorg-dev x11-apps \
openbox obconf obmenu \
weston xwayland \
2021-02-20 04:29:49 +09:00
alsa-utils \
2020-09-28 00:49:26 +09:00
bash tmux vim htop \
midori pcmanfm lxterminal xterm gnome-terminal fonts-noto-cjk \
2021-02-23 23:37:39 +09:00
dbus udev build-essential flex bison pkg-config autotools-dev libtool autoconf automake device-tree-compiler\
2020-10-27 19:27:27 +09:00
python3 python3-dev python3-setuptools python3-wheel python3-pip python3-smbus \
2021-02-23 23:37:39 +09:00
resolvconf net-tools ssh openssh-client avahi-daemon curl wget
2020-09-28 00:49:26 +09:00
2021-02-23 23:39:40 +09:00
# Fix Midori launch failure
sudo update-mime-database /usr/share/mime
2020-10-27 19:52:59 +09:00
# Get wild
cat <<EOF > /etc/apt/sources.list
2021-02-20 04:29:49 +09:00
deb http://deb.debian.org/debian buster main contrib non-free
deb-src http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
deb-src http://deb.debian.org/debian buster-updates main contrib non-free
deb http://deb.debian.org/debian-security buster/updates main contrib non-free
deb-src http://deb.debian.org/debian-security buster/updates main contrib non-free
2020-10-27 19:52:59 +09:00
EOF