diff options
author | Humphrey Lin <[email protected]> | 2020-12-01 21:13:29 +0800 |
---|---|---|
committer | Humphrey Lin <[email protected]> | 2020-12-01 21:13:29 +0800 |
commit | 0b5c0e2e318ed131200183c6d32e9cab30952b12 (patch) | |
tree | 2f6bbca3cac8856243871f8bbe699a9549110b66 /install.sh | |
parent | 7fdb35cec7474819c6e39678b4dceb0053113867 (diff) | |
parent | 514eab77de4da4b9ffb4c411d81729d04e55588f (diff) | |
download | dotfiles-0b5c0e2e318ed131200183c6d32e9cab30952b12.tar.gz dotfiles-0b5c0e2e318ed131200183c6d32e9cab30952b12.tar.bz2 dotfiles-0b5c0e2e318ed131200183c6d32e9cab30952b12.zip |
Add config for ruby on macOS
Diffstat (limited to 'install.sh')
-rw-r--r-- | install.sh | 62 |
1 files changed, 9 insertions, 53 deletions
@@ -11,68 +11,25 @@ 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 [email protected]: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 - response=${response,,} # tolower - if [[ "$response" =~ ^(yes|y)$ ]]; then - cd "$HOME" - rm -rf dotfiles - git clone [email protected]:humpylin/dotfiles.git + cd "$HOME" - 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 - fi + 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 ) } @@ -87,7 +44,6 @@ main() { check_is_sudo if [[ $cmd == all ]]; then - base_install get_dotfiles fi } |