From 275145e8228ea28895b3b9fa5badeed51f80f1c9 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Sat, 23 Nov 2024 19:30:46 +0100 Subject: [PATCH] Add Auto Install Scripts --- .config/.gitignore | 5 ++++- .config/glow/install.sh | 3 +++ .config/install.sh | 9 +++++++++ .config/nvim | 2 +- .config/systemd/install.sh | 3 +++ .zshrc | 15 ++++++++++++--- Readme.md | 22 +++++++++++++++++++--- 7 files changed, 51 insertions(+), 8 deletions(-) create mode 100755 .config/glow/install.sh create mode 100755 .config/install.sh create mode 100755 .config/systemd/install.sh diff --git a/.config/.gitignore b/.config/.gitignore index c26a111..6ad825f 100644 --- a/.config/.gitignore +++ b/.config/.gitignore @@ -1,7 +1,10 @@ # Ignore Everything By Default /* -#Unignore Ignore +# Install Script +!install.sh + +# Unignore Ignore !.gitignore # Oh My Bash diff --git a/.config/glow/install.sh b/.config/glow/install.sh new file mode 100755 index 0000000..d10e022 --- /dev/null +++ b/.config/glow/install.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +command -v glow &>/dev/null || go install github.com/charmbracelet/glow@latest diff --git a/.config/install.sh b/.config/install.sh new file mode 100755 index 0000000..96287cd --- /dev/null +++ b/.config/install.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +$HOME/.config/nvim/install.sh +$HOME/.config/glow/install.sh +$HOME/.config/systemd/install.sh + +# Git +command -v delta &>/dev/null || sudo dnf install -y git-delta +command -v git-graph &>/dev/null || cargo install git-graph diff --git a/.config/nvim b/.config/nvim index 5fc2bae..61d0f5c 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit 5fc2baefbe0ff240406b33ec9828dd4da29510af +Subproject commit 61d0f5cf4cbd89f5c3676f72e2a3bd31b85880cd diff --git a/.config/systemd/install.sh b/.config/systemd/install.sh new file mode 100755 index 0000000..66b4831 --- /dev/null +++ b/.config/systemd/install.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +command -v ra-multiplex &>/dev/null || cargo install ra-multiplex diff --git a/.zshrc b/.zshrc index 29365f4..8c7cbe1 100644 --- a/.zshrc +++ b/.zshrc @@ -64,7 +64,7 @@ export npm_config_log="$HOME/.local/share/npm/logs" # Volta export VOLTA_HOME="$HOME/.local/share/volta" -[ ! -d $VOLTA_HOME ] && curl https://get.volta.sh | bash -s -- --skip-setup +[ ! -d $VOLTA_HOME ] && curl https://get.volta.sh | bash -s -- --skip-setup && volta install node@lts # Go export GOPATH=~/.local/share/go @@ -76,6 +76,7 @@ export RUSTUP_HOME=$HOME/.local/share/rustup zinit snippet OMZP::rust # Php +export COMPOSER_HOME=$HOME/.local/share/composer zinit snippet OMZP::composer zinit snippet OMZP::symfony6 @@ -86,13 +87,21 @@ export HSA_OVERRIDE_GFX_VERSION=10.3.0 # RX 6650 XT export JUST_UNSTABLE=1 # PATH -export PATH=$PATH:$VOLTA_HOME/bin:$GOBIN:$CARGO_HOME/bin +export PATH=$PATH:$VOLTA_HOME/bin:$GOBIN:$CARGO_HOME/bin:$COMPOSER_HOME/vendor/bin + +# Install Dependencies +command -v go &>/dev/null || sudo dnf install go +[ ! -d $RUSTUP_HOME ] && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y +command -v composer &>/dev/null || sudo dnf install composer + + +# Install Scripts +$HOME/.config/install.sh # Aliases ######################################################### alias edit-nvim-conf="nvim ~/.config/nvim" alias edit-zsh-conf="nvim ~/.zshrc" -alias todo="nvim ~/Dokumente/Notes/Todo.md" alias hist="eval \$(cat $HISTFILE | fzf)" alias nano="nvim" alias neofetch="fastfetch" diff --git a/Readme.md b/Readme.md index 8f07873..02f2ca1 100644 --- a/Readme.md +++ b/Readme.md @@ -7,10 +7,26 @@ ## Setup -### Fedora +### Install Dependencies -#### Install System Packages +> [NOTE] +> Parts of the Dotfiles automatic Dependency resolution relies on **dnf** the Fedora package Manager. +> This is why only **dnf** is listed here. ```sh -dnf install -y test +sudo dnf install -y curl wget tar unzip gzip git make just fzf ``` + +### Install + +> [CAUTION] +> This is a **destructive installation** and will **overwrite** existing conflicting files. + +```sh +cd ~ && \ +git init -b neo && \ +git remote add origin https://git.euph.dev/Snoweuph/Dotfiles.git && \ +git fetch --all && \ +git reset --hard origin/neo && \ +git submodule update --init --recursive +``` \ No newline at end of file