From 233f05992e0b799b33af636f5cb24dd756e25e56 Mon Sep 17 00:00:00 2001 From: akshay Date: Thu, 7 Mar 2024 15:06:56 +0530 Subject: [PATCH] Shell and php sury scripts --- php_sury.sh | 13 ++++++++++ shell_setup.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 php_sury.sh create mode 100644 shell_setup.sh diff --git a/php_sury.sh b/php_sury.sh new file mode 100644 index 0000000..f5cd2b2 --- /dev/null +++ b/php_sury.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# To add this repository please do: + +if [ "$(whoami)" != "root" ]; then + SUDO=sudo +fi + +${SUDO} apt-get update +${SUDO} apt-get -y install lsb-release ca-certificates curl +${SUDO} curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb +${SUDO} dpkg -i /tmp/debsuryorg-archive-keyring.deb +${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' +${SUDO} apt-get update diff --git a/shell_setup.sh b/shell_setup.sh new file mode 100644 index 0000000..7eb7892 --- /dev/null +++ b/shell_setup.sh @@ -0,0 +1,66 @@ +#! /bin/sh + +if [ "$(whoami)" != "root" ]; then + SUDO=sudo +fi + +${SUDO} apt update +${SUDO} apt install -y vim net-tools zsh fzf curl wget git net-tools curl dnsutils telnet htop mc screen + + +# Install and configure Zimfw +curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh +echo ' +zmodule environment +zmodule git +zmodule input +zmodule termtitle +zmodule utility +zmodule duration-info +zmodule git-info +zmodule prompt-pwd +zmodule eriner +zmodule zsh-users/zsh-completions --fpath src +zmodule completion +zmodule zsh-users/zsh-syntax-highlighting +zmodule zsh-users/zsh-history-substring-search +zmodule zsh-users/zsh-autosuggestions' > ~/.zimrc + + +# Configure FZF +${SUDO} echo " source /usr/share/doc/fzf/examples/completion.zsh" >> ~/.zshrc +${SUDO} echo "source /usr/share/doc/fzf/examples/key-bindings.zsh" >> ~/.zshrc +${SUDO} echo 'alias vi="vim"' >> ~/.zshrc + +# Configure VIM +curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +echo " +call plug#begin() + Plug 'preservim/nerdtree' +call plug#end() +autocmd StdinReadPre * let s:std_in=1 +autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif +map :NERDTreeToggle +map l +map h +map j +map k + +set ts=2 +set syntax= +set sw=2 +set mouse= +set undodir=~/.vim/undo/ +set undofile" > ~/.vimrc +vim +PlugInstall +qall + + +# Set Timezone +timedatectl set-timezone Asia/Kolkata + +# Change shell to zsh +chsh -s /bin/zsh +zsh + +# Install Zimfw modules +zimfw install