Skip to content

Commit

Permalink
Readme + Docker test + Bash evol
Browse files Browse the repository at this point in the history
  • Loading branch information
betd-bmabille committed Feb 10, 2020
1 parent 0283438 commit f878cfe
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 7 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
20 changes: 14 additions & 6 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,10 +23,13 @@ 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
}

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

Expand All @@ -37,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

0 comments on commit f878cfe

Please sign in to comment.