diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e1f8f8a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +install/.state \ No newline at end of file diff --git a/README.md b/README.md index defed53..83aa7d3 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,8 @@ ## Install ``` -git clone https://github.com/andrejusk/dotfiles.git ~/git/dotfiles -cd ~/git/dotfiles/install-scripts -bash ./setup.sh +git clone https://github.com/andrejusk/dotfiles.git ~/workspace/dotfiles +sudo sh ~/workspace/dotfiles/setup.sh ``` ## About diff --git a/install/00-setup.sh b/install/00-setup.sh new file mode 100644 index 0000000..25b9607 --- /dev/null +++ b/install/00-setup.sh @@ -0,0 +1 @@ +touch $state_dir \ No newline at end of file diff --git a/install/01-apt.sh b/install/01-apt.sh new file mode 100644 index 0000000..498f16a --- /dev/null +++ b/install/01-apt.sh @@ -0,0 +1,7 @@ +#!/bin/bash +GREY='\033[0;37m' +NC='\033[0m' +echo "${GREY}andrejusk/dotfiles/apt${NC}" + +sudo apt-get update +sudo apt-get upgrade -y diff --git a/install/02-fish.sh b/install/02-fish.sh new file mode 100644 index 0000000..2e465cf --- /dev/null +++ b/install/02-fish.sh @@ -0,0 +1,16 @@ +#!/bin/bash +GREY='\033[0;37m' +NC='\033[0m' +echo "${GREY}andrejusk/dotfiles/fish${NC}" + + +if grep -q SomeString "$File"; then + +elif + +fi + + +sudo apt-add-repository ppa:fish-shell/release-3 +sudo apt-get update +sudo apt-get install fish diff --git a/install/10-setup.sh b/install/10-setup.sh new file mode 100644 index 0000000..4287ca8 --- /dev/null +++ b/install/10-setup.sh @@ -0,0 +1 @@ +# \ No newline at end of file diff --git a/install/11-docker.sh b/install/11-docker.sh new file mode 100644 index 0000000..a49d7ec --- /dev/null +++ b/install/11-docker.sh @@ -0,0 +1,27 @@ +#!/bin/bash +GREY='\033[0;37m' +NC='\033[0m' +echo "${GREY}andrejusk/dotfiles/docker${NC}" + +if grep -q SomeString "$File"; then + +elif + +fi + + + +sudo apt-get install \ + apt-transport-https \ + ca-certificates \ + curl \ + gnupg-agent \ + software-properties-common + +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - +sudo apt-key fingerprint 0EBFCD88 + + sudo add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) \ + stable" diff --git a/install/apt.sh b/install/apt.sh deleted file mode 100644 index 7fc9758..0000000 --- a/install/apt.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -sudo apt-get update -sudo apt-get upgrade -y diff --git a/install/setup.sh b/install/setup.sh index 1f41da0..43429a8 100644 --- a/install/setup.sh +++ b/install/setup.sh @@ -1,38 +1,38 @@ -# start -export DEBIAN_FRONTEND=noninteractive +# # start +# export DEBIAN_FRONTEND=noninteractive -# set up -ln -s /mnt/c/git ~/git +# # set up +# ln -s /mnt/c/git ~/git -# # # shell +# # # # shell -# apt -# brew -yes '' | sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" -echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >>~/.profile -eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) -sudo apt-get install build-essential -brew install gcc +# # apt +# # brew +# yes '' | sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" +# echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >>~/.profile +# eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) +# sudo apt-get install build-essential +# brew install gcc -# zsh -sudo apt install zsh -y -sudo apt-get install powerline fonts-powerline -y +# # zsh +# sudo apt install zsh -y +# sudo apt-get install powerline fonts-powerline -y -# oh my zsh -sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" +# # oh my zsh +# sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" -# highlighting -git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.zsh-syntax-highlighting" --depth 1 -echo "source $HOME/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> "$HOME/.zshrc" +# # highlighting +# git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.zsh-syntax-highlighting" --depth 1 +# echo "source $HOME/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> "$HOME/.zshrc" -# spaceship -git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" -ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" -sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="spaceship"/g' ~/.zshrc +# # spaceship +# git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" +# ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" +# sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="spaceship"/g' ~/.zshrc -# cleanup -sudo apt autoremove -y -export DEBIAN_FRONTEND=readline +# # cleanup +# sudo apt autoremove -y +# export DEBIAN_FRONTEND=readline diff --git a/setup.sh b/setup.sh index a9bf588..ff6df88 100644 --- a/setup.sh +++ b/setup.sh @@ -1 +1,13 @@ #!/bin/bash +CYAN='\033[0;36m' +NC='\033[0m' +echo "${CYAN}andrejusk/dotfiles${NC}" + +if [[ $EUID -ne 0 ]]; then + echo "sudo !!" + exit 1 +fi + +install_dir="$0/install" +state_dir="$install_dir/.state" +for script in $install_dir/*.sh; do sh $script; done