diff options
author | gxlin <[email protected]> | 2021-07-06 22:00:15 +0800 |
---|---|---|
committer | gxlin <[email protected]> | 2021-07-06 22:00:15 +0800 |
commit | 43b356933766807cff3cce9dda6955469f4df49c (patch) | |
tree | b13768fdd9c3d4fd00571870639a9100b1086bbf /install.sh | |
parent | 20f2705342e1c444bda1b4c9a2077408ae14389a (diff) | |
download | dotfiles-43b356933766807cff3cce9dda6955469f4df49c.tar.gz dotfiles-43b356933766807cff3cce9dda6955469f4df49c.tar.bz2 dotfiles-43b356933766807cff3cce9dda6955469f4df49c.zip |
Reorganized emacs config
Diffstat (limited to 'install.sh')
-rw-r--r-- | install.sh | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/install.sh b/install.sh deleted file mode 100644 index e4a5761..0000000 --- a/install.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -# install.sh - -check_is_sudo() { - if [ "$EUID" -ne 0 ]; then - echo "Please run as root." - exit - fi -} - -usage() { - echo "Usage: sudo bash install.sh [OPTION]" - echo " dotfiles - link all dotfiles" - echo " all - install all things listed above" -} - -get_dotfiles() { - # create subshell - ( - echo "--------- Get Dotfiles Now ---------" - - - cd "$HOME" - - rm -rf .vimrc .tmux.conf .bashrc .zshrc .i3/config .emacs.d/init.el .gitconfig - 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 - ln -s ~/.dotfiles/.gitconfig .gitconfig - echo "source ~/.dotfiles/.vim/init.vim" > ~/.vimrc - ) -} - -main() { - local cmd=$1 - - if [[ -z "$cmd" ]]; then - usage - exit 1 - fi - - check_is_sudo - - if [[ $cmd == all ]]; then - get_dotfiles - fi -} - -main "$@" |