Browse Source

Shell and php sury scripts

master
Akshay 9 months ago
parent
commit
233f05992e
2 changed files with 79 additions and 0 deletions
  1. +13
    -0
      php_sury.sh
  2. +66
    -0
      shell_setup.sh

+ 13
- 0
php_sury.sh View File

@ -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

+ 66
- 0
shell_setup.sh View File

@ -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 <C-n> :NERDTreeToggle<CR>
map <C-l> <C-w>l
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>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

Loading…
Cancel
Save