adding first revision of script. - bootstrap - Bootstrap script for my alpine linux desktop.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 3a73bce62ba23716ea680182a6ba8c19afd8e631
(HTM) Author: Jay Scott <me@jay.scot>
Date: Sun, 25 Sep 2022 21:11:59 +0100
adding first revision of script.
Diffstat:
A README | 5 +++++
A install.sh | 118 +++++++++++++++++++++++++++++++
2 files changed, 123 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/README b/README
@@ -0,0 +1,5 @@
+
+|> alpine-bootstrap
+
+This is a script to bootstrap a base alpine linux install. quite unique
+to my setup so doubt it would be useful to anyone else.
(DIR) diff --git a/install.sh b/install.sh
@@ -0,0 +1,118 @@
+#!/usr/bin/env sh
+# bootstrap for alpine linux
+
+user="jay"
+src="/home/jay/src"
+
+echo "=== enable community repo ==="
+sed -i '/v3\..*\/community/s/^#//g' /etc/apk/repositories
+
+echo "=== updating base system ==="
+apk update
+apk upgrade -a
+
+echo "=== installing cli essentials ==="
+apk add curl doas wget git vim tar zip gzip bzip2 rsync build-base less
+
+echo "=== installing wayland ==="
+apk add wlsunset wl-clipboard mesa-dri-gallium eudev font-hack seatd sway foot bemenu xwayland
+setup-udev
+
+echo "=== installing tools ==="
+apk add gemget yt-dlp pass fzf mpv zathura-pdf-mupdf firefox mutt mpd ncmpcpp
+
+echo "=== installing audio ==="
+apk add pipewire-pulse pamixer dbus dbus-openrc pipewire wireplumber rtkit pipewire-alsa
+
+echo "=== bluetooth setup ==="
+apk add bluez bluez-openrc pipewire-spa-bluez
+
+echo "=== installing documentation ==="
+apk add mandoc mandoc-apropos man-pages docs
+
+if [ ! -d "/home/$user" ]; then
+ echo "=== creating user ==="
+ adduser "$user" || die "unable to add user"
+ adduser "$user" audio
+ adduser "$user" wheel
+ adduser "$user" input
+ adduser "$user" video
+ adduser "$user" seat
+ adduser "$user" rtkit
+ mkdir "/home/$user/.config"
+ mkdir "$src"
+fi
+
+if [ ! -e /home/$user/bin/fdm ]; then
+ echo "=== build and install fdm ==="
+ pkgver=2.1
+ apk add tdb-dev openssl-dev>3 zlib-dev bsd-compat-headers pcre-dev automake autoconf libtool
+ wget -P /tmp https://github.com/nicm/fdm/releases/download/$pkgver/fdm-$pkgver.tar.gz
+ tar -zxvf /tmp/fdm-$pkgver.tar.gz -C $src
+ cd $src/fdm-$pkgver
+ autoreconf -vif
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-pcre --mandir=/usr/share/man
+ make
+ cp fdm /home/jay/bin
+ chown -R $user:$user $src/fdm-$pkgver
+fi
+
+if [ ! -e /usr/local/bin/senpai ]; then
+ echo "=== build and install senpai ==="
+ apk add go scdoc
+ git clone https://git.sr.ht/~taiite/senpai $src/senpai
+ cd $src/senpai
+ make
+ make install
+fi
+
+if [ ! -e /usr/local/bin/sfeed ]; then
+ echo "=== build and install sfeed ==="
+ apk add ncurses-dev
+ git clone git://git.codemadness.org/sfeed $src/sfeed
+ cd $src/sfeed
+ make
+ make install
+fi
+
+if [ ! -e /home/$user/bin/lf ]; then
+ echo "=== install lf ==="
+ pkgver=r27
+ apk add ncurses
+ wget -P /tmp https://github.com/gokcehan/lf/releases/download/$pkgver/lf-linux-amd64.tar.gz
+ tar -zxvf /tmp/lf-linux-amd64.tar.gz -C /home/$user/bin
+fi
+
+if [ ! -e /usr/local/bin/rdrview ]; then
+ echo "=== build and install rdrview ==="
+ apk add libxml2-dev libseccomp-dev curl-dev lynx
+ git clone https://github.com/eafer/rdrview.git $src/rdrview
+ cd $src/rdrview
+ make
+ make install
+fi
+
+if [ ! -e /usr/local/bin/castget ]; then
+ echo "=== build and install castget ==="
+ src=/home/$user/src/castget
+ apk add glib-dev libxml2-dev curl-dev
+ git clone https://github.com/mlj/castget.git $src/castget
+ cd $src/castget
+ autoreconf -fi
+ ./configure --without-taglib
+ make
+ make install
+fi
+
+chown -R $user:$user $src
+
+echo "=== Starting services ==="
+rc-update add seatd
+rc-service seatd start
+
+rc-update add dbus default
+rc-service dbus start
+
+rc-update add bluetooth
+rc-service bluetooth start
+