Browse Source

alpine installation fixed?

master
Juni Kim 2 years ago
parent
commit
951874b039
  1. 1
      Makefile
  2. 54
      install_alpine.sh

1
Makefile

@ -1,6 +1,5 @@
ubuntu:
docker run -it --rm -v $(CURDIR):/root/sc ubuntu /bin/bash
#docker run -it -v $(pwd):/root/serverconfigs --rm ubuntu /bin/bash
fedora:
docker run -it --rm -v $(CURDIR):/root/sc fedora /bin/bash

54
install_alpine.sh

@ -23,7 +23,7 @@ root_setup() {
adduser root wheel || exit 1
}
installdoas() {
apk add doas
apk add doas alpine-conf
echo "permit nopass :wheel" >> /etc/doas.d/doas.conf
}
if test -z "$DOCKERBUILD"; then
@ -43,12 +43,14 @@ user_setup() {
Options:
-G,--graphical install xorg and wm
-N,--nvim install neovim
-C,--cp install competitive programming scripts
EOF
}
GRAPHICAL=
CP=
NVIM=
while test $# -ne 0; do
case $1 in
-G|--graphical)
@ -57,6 +59,9 @@ EOF
-C|--cp)
CP=1
;;
-N|--nvim)
NVIM=1
;;
*)
echo "invalid option $1"
help_text
@ -73,15 +78,35 @@ EOF
dev() {
echo "Developer tools..."
doas apk add git make python3 nodejs npm go cargo g++ gcc curl bash shadow || exit 1
doas apk add git make python3 nodejs npm go g++ gcc curl bash shadow || exit 1
if ! test -z "$NVIM"; then
doas apk add cargo
fi
}
sysinfo() {
echo "Dylan Araps scripts"
doas apk add neofetch pfetch fff
cd "$HOME" || exit 1;
mkdir -p repos
git clone https://github.com/dylanaraps/pfetch "$HOME/repos/pfetch"
git clone https://github.com/dylanaraps/neofetch "$HOME/repos/neofetch"
git clone https://github.com/dylanaraps/fff "$HOME/repos/fff"
cd "$HOME/repos/pfetch" || exit 1;
doas make install || exit 2;
cd "$HOME" || exit 1;
cd "$HOME/repos/neofetch" || exit 1;
doas make install || exit 2;
cd "$HOME" || exit 1;
cd "$HOME/repos/fff" || exit 1;
doas make install || exit 2;
cd "$HOME" || exit 1;
}
dotfiles() {
echo "Adding zsh and tmux configs"
# zsh plugins
@ -118,7 +143,7 @@ EOF
vimconfigs() {
doas apk add vim
wget https://git.junickim.me/junikimm717/vim2023/raw/branch/master/lsp.vimrc -o .vimrc
wget https://git.junickim.me/junikimm717/vim2023/raw/branch/master/lsp.vimrc -O .vimrc
}
competitiveprogramming() {
@ -130,16 +155,24 @@ EOF
graphical() {
# xorg and drivers
doas setup-xorg-base
doas apk add xf86-video-qxl mesa-egl
doas apk add xf86-input-keyboard xf86-input-mouse xf86-input-evdev
doas apk add xf86-video-qxl mesa-egl xrandr
doas apk add xf86-input-evdev
# wm applications
doas apk add i3wm nitrogen alacritty polybar i3lock
doas apk add i3wm alacritty polybar i3lock feh
# fonts
doas apk add font-jetbrains-mono-nerd font-siji terminus-font ttf-inconsolata ttf-dejavu font-bitstream-* font-noto font-noto-cjk ttf-font-awesome font-noto-extra
doas apk add font-jetbrains-mono-nerd terminus-font ttf-inconsolata ttf-dejavu font-noto font-noto-cjk ttf-font-awesome font-noto-extra
doas apk add firefox-esr
mkdir -p "$HOME/repos/siji"
cd "$HOME/repos/siji" || exit 1
curl -LJO https://github.com/fauno/siji/archive/master.tar.gz || exit 1
tar -xzvf ./siji-master.tar.gz || exit 1
mkdir -p "$HOME/.local/share/fonts" || exit 1
cp ./siji-master/ttf/siji.ttf "$HOME/.local/share/fonts/" || exit 1
fc-cache -rv
mkdir -p "$HOME/.config/polybar" || exit 1
mkdir -p "$HOME/.config/i3" || exit 1
mkdir -p "$HOME/.config/picom" || exit 1
@ -148,7 +181,10 @@ EOF
cp "$DIR/dots/picom.conf" "$HOME/.config/picom/picom.conf" || exit 1
}
(dev && sysinfo && dotfiles && vimconfigs && neovim) || exit 1
(dev && sysinfo && dotfiles && vimconfigs) || exit 1
if ! test -z "$NVIM"; then
neovim || exit 1
fi
if ! test -z "$CP"; then
competitiveprogramming || exit 1
fi

Loading…
Cancel
Save