Skip to content

Commit

Permalink
Merge pull request #2 from benjy8001/develop
Browse files Browse the repository at this point in the history
Evolutions
  • Loading branch information
benjy8001 authored Feb 10, 2020
2 parents ff1b147 + f878cfe commit 3da12ee
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 11 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM debian:jessie

COPY ./ /srv

VOLUME /srv
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
DOCKER_COMPOSE = docker-compose

EXEC_DEBIAN = $(DOCKER_COMPOSE) exec -T debian /entrypoint

start:
printf "\033[32m You can go take a coffee while we work for you \033[0m\n"
$(DOCKER_COMPOSE) pull
$(DOCKER_COMPOSE) up -d --remove-orphans debian

stop:
$(DOCKER_COMPOSE) stop

run:
$(EXEC_DEBIAN) ./install_zsh.sh

connect: ## Connect to the container of the project
$(EXEC_DEBIAN)

.PHONY: start stop run connect
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# zsh_powerlevel9k_installer
### Custom ZSH and powerlevel9k autoinstaller for debian

Install software and fonts needed ; customise ~/.zshrc ; etting zsh as default shell

**Installation :**

Just run ./install_zsh.sh and enjoy !
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '3.4'

services:
debian:
image: debian:jessie
volumes:
- ./:/srv:ro
28 changes: 18 additions & 10 deletions install_zsh.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash
# Install script for ZSH and Powerlevel9k

set -e
set -u

if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
Expand All @@ -18,17 +23,17 @@ else
NORMAL=""
fi

set -e

command -v git >/dev/null 2>&1 || {
echo "Error: git is not installed"
echo "${RED}Error: git is not installed${NORMAL}"
exit 1
}

apt-get install git zsh fonts-powerline wget curl tee
command -v tee >/dev/null 2>&1 || {
echo "${RED}Error: tee is not installed${NORMAL}"
exit 1
}

printf "${BLUE}Installing Oh My Zsh...${NORMAL}\n"
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
apt-get install -y git zsh fonts-powerline wget curl

printf "${BLUE}Installing nerd-fonts...${NORMAL}\n"
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/Hack.zip
Expand All @@ -40,17 +45,17 @@ fc-cache -f -v

printf "${BLUE}Cloning powerlevel9k...${NORMAL}\n"
env git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k || {
printf "Error: git clone of powerlevel9k repo failed\n"
printf "${RED}Error: git clone of powerlevel9k repo failed${NORMAL}\n"
exit 1
}
printf "${BLUE}Cloning zsh-autosuggestions...${NORMAL}\n"
env git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions || {
printf "Error: git clone of zsh-autosuggestions repo failed\n"
printf "${RED}Error: git clone of zsh-autosuggestions repo failed${NORMAL}\n"
exit 1
}
printf "${BLUE}Cloning zsh-syntax-highlighting...${NORMAL}\n"
env git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting || {
printf "Error: git clone of zsh-syntax-highlighting repo failed\n"
printf "${RED}Error: git clone of zsh-syntax-highlighting repo failed\${NORMAL}n"
exit 1
}

Expand Down Expand Up @@ -184,8 +189,11 @@ source $ZSH/oh-my-zsh.sh
# alias ohmyzsh="mate ~/.oh-my-zsh"
END

printf "${BLUE}Installing Oh My Zsh...${NORMAL}\n"
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

printf "${BLUE}Sourcing ~/.zshrc${NORMAL}\n"
/bin/zsh -c 'source ~/.zshrc'

printf "${BLUE}Setting zsh as default shell${NORMAL}\n"
chsh -s /bin/zsh
chsh -s /bin/zsh

0 comments on commit 3da12ee

Please sign in to comment.