From d1727502759d95aec788ec9fbf969d7c767ad8ef Mon Sep 17 00:00:00 2001 From: Gerard Braad Date: Sat, 11 Jan 2025 15:35:49 +0000 Subject: [PATCH] Perform old install from dot command --- install.sh | 52 +-------------------------------- zsh/.dot | 13 +++++++++ zsh/.zshrc.d/dotfiles.zsh | 61 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 51 deletions(-) mode change 100755 => 120000 install.sh diff --git a/install.sh b/install.sh deleted file mode 100755 index 07560e7..0000000 --- a/install.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -APTPKGS="git zsh stow" -RPMPKGS="git-core zsh stow" - -# Crude multi-os installation option -if [ -x "/usr/bin/apt-get" ] -then - sudo apt-get install -y $APTPKGS -elif [ -x "/usr/bin/dnf" ] -then - sudo dnf install -y $RPMPKGS - - # allow first-time system install - export SYSTEM_INSTALL=1 -elif [ -x "/usr/bin/yum" ] -then - sudo yum install -y $RPMPKGS -fi - -# Add missing directory layout -if [ ! -d "~/.config" ] -then - mkdir -p ~/.config -fi - -mkdir -p ~/.local/bin -mkdir -p ~/.local/lib/python2.7/site-packages/ - -# Personal dotfiles -git clone https://github.com/gbraad/dotfiles.git ~/.dotfiles -cd ~/.dotfiles -git submodule update --init --progress - -# stow the configurations -stow powerline -stow zsh -stow tmux -stow vim -#stow git -stow i3 - -# stow wsl specific stuff -if grep -qi Microsoft /proc/version; then - stow wsl -fi - -# stow cygwin specific stuff -if [ "$OSTYPE" = "cygwin" ] -then - stow cygwin -fi diff --git a/install.sh b/install.sh new file mode 120000 index 0000000..4135362 --- /dev/null +++ b/install.sh @@ -0,0 +1 @@ +zsh/.zshrc.d/dotfiles.zsh \ No newline at end of file diff --git a/zsh/.dot b/zsh/.dot index 2a03dc7..944900c 100644 --- a/zsh/.dot +++ b/zsh/.dot @@ -2,3 +2,16 @@ aliases=true autoupdate=true autostart=false + +[stow] +git=false +powerline=true +zsh=true +tmux=true +vim=true +i3=true + +[windows] +wsl=true +cygwin=true + diff --git a/zsh/.zshrc.d/dotfiles.zsh b/zsh/.zshrc.d/dotfiles.zsh index 4875b07..4bef4e5 100755 --- a/zsh/.zshrc.d/dotfiles.zsh +++ b/zsh/.zshrc.d/dotfiles.zsh @@ -1,5 +1,66 @@ #!/bin/zsh +# Temporary including the old installation method +oldinstall() { + APTPKGS="git zsh stow" + RPMPKGS="git-core zsh stow" + + # Crude multi-os installation option + if [ -x "/usr/bin/apt-get" ] + then + sudo apt-get install -y $APTPKGS + elif [ -x "/usr/bin/dnf" ] + then + sudo dnf install -y $RPMPKGS + + # allow first-time system install + export SYSTEM_INSTALL=1 + elif [ -x "/usr/bin/yum" ] + then + sudo yum install -y $RPMPKGS + fi + + # Add missing directory layout + if [ ! -d "~/.config" ] + then + mkdir -p ~/.config + fi + + mkdir -p ~/.local/bin + mkdir -p ~/.local/lib/python2.7/site-packages/ + + # Personal dotfiles + git clone https://github.com/gbraad/dotfiles.git ~/.dotfiles + cd ~/.dotfiles + git submodule update --init --progress + + # stow the configurations + stow powerline + stow zsh + stow tmux + stow vim + #stow git + stow i3 + + # stow wsl specific stuff + if grep -qi Microsoft /proc/version; then + stow wsl + fi + + # stow cygwin specific stuff + if [ "$OSTYPE" = "cygwin" ] + then + stow cygwin + fi +} + +if [[ "$0" == *install.sh* ]]; then + echo "Performing install" + oldinstall + exit 0 +fi + + CONFIG="${HOME}/.dot" alias dotini="git config -f $CONFIG"