Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127#!/usr/bin/env bash## install.sh installs my things.
set -euo pipefail
script_dir=$(dirname "$0")DOTFILES=$(realpath "$script_dir/..")LOCAL_BIN="$HOME/.local/bin"LOCAL_OPT="$HOME/.local/opt"LOCAL_SHARE="${XDG_DATA_HOME:-$HOME/.local/share}"DEV="$HOME/dev"DOWNLOADS="${XDG_DOWNLOAD_DIR:-$HOME/Downloads}"PICTURES="${XDG_PICTURES_DIR:-$HOME/Pictures}"VIDEOS="${XDG_VIDEOS_DIR:-$HOME/Videos}"
cat "$DOTFILES/install/pepe.txt"
source "$DOTFILES/install/utils.sh"
case "$(uname)" inLinux) MACHINE="linux" ;;Darwin) MACHINE="darwin" ;;*) error "unsupported operating system: $(uname)" ;;esac
cd "$DOTFILES"
mkdir -p "$LOCAL_BIN" "$LOCAL_OPT" "$LOCAL_SHARE" "$DEV" "$DOWNLOADS" "$PICTURES" "$VIDEOS"
# make scripts executablestep "chmod"chmod -v ug+x \ $DOTFILES/.local/bin/* \ $DOTFILES/.config/waybar/scripts/* \ $DOTFILES/.config/borders/bordersrc \ $DOTFILES/.config/lf/previewersuccess
# install toolsstep "tools"source "$DOTFILES/install/platform.sh"success
install_rust() { rustup toolchain install stable rustup toolchain install nightly rustup default stable rustup update}install_wrapper cargo install_rust
if exists cargo; then step "cargo packages" cargo install cargo-update qmkfmt kdlfmt successfi
if exists fnm; then step "node" fnm install --lts fnm default lts-latest eval "$(fnm env --shell bash)" npm i -g typescript @fsouza/prettierd @earendil-works/pi-coding-agent @tobilu/qmd successfi
if exists uv; then step "basedpyright" uv tool install basedpyright successfi
if [ ! -d "$PICTURES/backgrounds" ]; then step "backgrounds" jj git clone https://github.com/r0nsha/backgrounds "$PICTURES/backgrounds" successfi
step "stow"cd "$DOTFILES"if ! stow .; then error "stow failed"fisuccess
# gnupg perms (stow links files into ~/.gnupg)mkdir -p "$HOME/.gnupg"find ~/.gnupg -type f -exec chmod 600 {} \;find ~/.gnupg -type d -exec chmod 700 {} \;
# default shellif exists "fish"; then if [ "$(basename "$SHELL")" != "fish" ]; then step "default shell" fish_bin=$(which fish) echo $fish_bin | sudo tee -a /etc/shells chsh -s $fish_bin sudo chsh -s $fish_bin success fifi
if exists "bat"; then step "bat cache" bat cache --build successfi
if [ "$MACHINE" = "darwin" ]; then pinentry_bin="$(which pinentry-mac || true)" if [ -n "$pinentry_bin" ]; then target="pinentry-program $pinentry_bin" conf="$DOTFILES/.gnupg/gpg-agent.conf" if ! grep -Fxq "$target" "$conf"; then sed -i '' "s|^pinentry-program .*|$target|" "$conf" gpg-connect-agent reloadagent /bye fi fifi
if exists "bob"; then bob use nightlyfi
echo "i installed your things :)"