Last active
July 23, 2023 22:38
-
-
Save audstanley/6653b3a288bfb008a96deb9865b33bb9 to your computer and use it in GitHub Desktop.
fresh-alpine-with-go-zsh-and-fzf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ash | |
# | |
############################################################# | |
# # | |
# Fresh Alpine Linux with all the Go things, zsh, and fzf # | |
# -Richard Stanley # | |
# -Thanks- YouTuber; /watch?v=tirOEF8Bnj8 # | |
# # | |
############################################################# | |
# | |
GO_VERSION=go1.20.6.linux-amd64.tar.gz # change_me | |
apk update | |
apk add patchelf gcompat curl tar shadow | |
apk add git vim zsh bash | |
curl https://dl.google.com/go/$GO_VERSION --output $GO_VERSION | |
mv $GO_VERSION /usr/local/bin/$GO_VERSION | |
cd /usr/local/bin | |
tar -xf $GO_VERSION | |
rm $GO_VERSION | |
cd go/bin | |
patchelf --set-interpreter /lib/libc.musl-x86_64.so.1 go | |
# gcompat include libresolv.so.2 # may not need | |
# To replace ash with zsh; | |
sed "s/root:x:0:0:root:\/root:\/bin\/ash/root:x:0:0:root:\/root:\/bin\/zsh/" -i /etc/passwd | |
# add the go path to the zsh root environment | |
grep -qxF 'PATH=$PATH:/usr/local/bin/go/bin' foo.bar || echo 'PATH=$PATH:/usr/local/bin/go/bin' >> .zshrc | |
#!/bin/zsh | |
# Install ohmyzsh; | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
cd ~/; | |
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf | |
~/.fzf/install | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment