From 06d6429e795777effa4a2fb5f3b3c71445f3d135 Mon Sep 17 00:00:00 2001 From: Humphrey Lin Date: Mon, 30 Nov 2020 10:48:19 +0000 Subject: Add a setup documents for manjaro --- install.sh | 60 ++++++++++-------------------------------------------------- 1 file changed, 10 insertions(+), 50 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 104dfa5..60881f1 100644 --- a/install.sh +++ b/install.sh @@ -11,67 +11,28 @@ check_is_sudo() { usage() { echo "Usage: sudo bash install.sh [OPTION]" - echo " base - install base pkgs" - echo " dotfiles - get dotfiles from GitHub and set soft links" + echo " dotfiles - link all dotfiles" echo " all - install all things listed above" } -base_install() { - echo "--------- Install Base Packages Now ---------" - if command -v apt > /dev/null; then - apt update - apt upgrade - apt install git \ - curl \ - cmake \ - build-essential \ - python3-dev \ - autojump \ - zsh \ - gcc \ - make \ - - pkg-config autoconf automake \ - python3-docutils \ - libseccomp-dev \ - libjansson-dev \ - libyaml-dev \ - libxml2-dev - else if command -v pacman > /dev/null; then - pacman -S autojump - else if command -v brew > /dev/null; then - brew install autojump - fi - # Universal Ctags - git clone git@github.com:universal-ctags/ctags.git - ( - cd ctags - ./autogen.sh - ./configure - make - make install - ) -} - get_dotfiles() { # create subshell ( echo "--------- Get Dotfiles Now ---------" - read -r -p "It will remove the dotfiles folder if it exists and overwrite all dotfiles. Are you sure? [y/N] " response + read -r -p "It will remove the .dotfiles folder if it exists and overwrite all dotfiles. Are you sure? [y/N] " response response=${response,,} # tolower if [[ "$response" =~ ^(yes|y)$ ]]; then cd "$HOME" - rm -rf dotfiles - git clone git@github.com:humpylin/dotfiles.git - - rm -rf .vimrc .tmux.conf .bashrc .zshrc .gitconfig - ln -s dotfiles/.vimrc .vimrc - ln -s dotfiles/.tmux.conf .tmux.conf - ln -s dotfiles/.bashrc .bashrc - ln -s dotfiles/.gitconfig .gitconfig - ln -s dotfiles/.zshrc .zshrc + rm -rf .dotfiles + git clone https://github.com/humpylin/dotfiles .dotfiles + + rm -rf .vimrc .tmux.conf .bashrc .zshrc + ln -s .dotfiles/.vimrc .vimrc + ln -s .dotfiles/.tmux.conf .tmux.conf + ln -s .dotfiles/.bashrc .bashrc + ln -s .dotfiles/.zshrc .zshrc fi ) } @@ -87,7 +48,6 @@ main() { check_is_sudo if [[ $cmd == all ]]; then - base_install get_dotfiles fi } -- cgit v1.2.3 From 514eab77de4da4b9ffb4c411d81729d04e55588f Mon Sep 17 00:00:00 2001 From: Humphrey Lin Date: Tue, 1 Dec 2020 18:10:09 +0000 Subject: Add config of i3wm and modify the EDITOR in .zshrc --- install.sh | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 60881f1..c592850 100644 --- a/install.sh +++ b/install.sh @@ -20,20 +20,16 @@ get_dotfiles() { ( echo "--------- Get Dotfiles Now ---------" - read -r -p "It will remove the .dotfiles folder if it exists and overwrite all dotfiles. Are you sure? [y/N] " response - response=${response,,} # tolower - if [[ "$response" =~ ^(yes|y)$ ]]; then - - cd "$HOME" - rm -rf .dotfiles - git clone https://github.com/humpylin/dotfiles .dotfiles - - rm -rf .vimrc .tmux.conf .bashrc .zshrc - ln -s .dotfiles/.vimrc .vimrc - ln -s .dotfiles/.tmux.conf .tmux.conf - ln -s .dotfiles/.bashrc .bashrc - ln -s .dotfiles/.zshrc .zshrc - fi + + cd "$HOME" + + rm -rf .vimrc .tmux.conf .bashrc .zshrc .i3/config .emacs.d/init.el + ln -s .dotfiles/.vimrc .vimrc + ln -s .dotfiles/.tmux.conf .tmux.conf + ln -s .dotfiles/.bashrc .bashrc + ln -s .dotfiles/.zshrc .zshrc + ln -s .dotfiles/.emacs.d/init.el .emacs.d/init.el + ln -s .dotfiles/.i3/config .i3/config ) } -- cgit v1.2.3