Fish and Docker install scripts
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
install/.state
|
||||
install/*.lock
|
||||
install.lock
|
||||
7
Makefile
Normal file
7
Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f install.lock install/*.lock
|
||||
|
||||
.PHONY: clear
|
||||
clear:
|
||||
rm -f install.lock
|
||||
47
install.sh
Executable file
47
install.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Runs all install scripts
|
||||
|
||||
# set -xv
|
||||
set -o pipefail
|
||||
|
||||
dir=`dirname $0`
|
||||
name=`basename $0 ".sh"`
|
||||
source $dir/utils.sh
|
||||
printf "${C_CYAN}andrejusk/dotfiles${C_NC}\n\n"
|
||||
|
||||
# Check if running
|
||||
lock_file=$dir/$name.lock
|
||||
if [ -f $lock_file ]; then
|
||||
printf "${C_RED}Script already running${C_NC}\n"
|
||||
exit 1
|
||||
else
|
||||
touch $lock_file # Requires clear
|
||||
fi
|
||||
|
||||
# Check for root
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
printf "${C_RED}Called without sudo, run:${C_NC}\n"
|
||||
printf "sudo !!\n\n"
|
||||
make clear
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run all install scripts
|
||||
install_dir="$dir/install"
|
||||
for script in $install_dir/*.sh;
|
||||
do
|
||||
script_name=`basename $script ".sh"`
|
||||
script_lock="$install_dir/$script_name.lock"
|
||||
if [ -f $script_lock ]; then
|
||||
printf "skipping $script_name\n"
|
||||
else
|
||||
printf "running $script_name\n"
|
||||
touch $script_lock
|
||||
bash -o pipefail $script | indent
|
||||
fi
|
||||
done
|
||||
|
||||
# Exit
|
||||
make clear
|
||||
exit 0
|
||||
8
install/00-apt.sh
Normal file
8
install/00-apt.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
apt-get -y update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y \
|
||||
-o Dpkg::Options::="--force-confdef" \
|
||||
-o Dpkg::Options::="--force-confold" upgrade
|
||||
apt-get -y autoremove
|
||||
apt-get -y autoclean
|
||||
@@ -1 +0,0 @@
|
||||
touch $state_dir
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
GREY='\033[0;37m'
|
||||
NC='\033[0m'
|
||||
echo "${GREY}andrejusk/dotfiles/apt${NC}"
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade -y
|
||||
6
install/01-fish.sh
Normal file
6
install/01-fish.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
apt-add-repository -y ppa:fish-shell/release-3
|
||||
apt update
|
||||
apt-get -y install fish
|
||||
chsh -s `which fish`
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/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
|
||||
@@ -1 +0,0 @@
|
||||
#
|
||||
@@ -1,27 +1,23 @@
|
||||
#!/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
|
||||
apt-get -y 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"
|
||||
apt-key fingerprint 0EBFCD88
|
||||
|
||||
add-apt-repository -y \
|
||||
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
|
||||
$(lsb_release -cs) \
|
||||
stable"
|
||||
apt update
|
||||
apt install -y docker-ce
|
||||
systemctl status docker
|
||||
|
||||
curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
|
||||
chmod +x /usr/local/bin/docker-compose
|
||||
docker-compose --version
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
# # start
|
||||
# export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
||||
# # set up
|
||||
# ln -s /mnt/c/git ~/git
|
||||
|
||||
|
||||
# # # # 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
|
||||
|
||||
# # 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)"
|
||||
|
||||
# # 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
|
||||
|
||||
|
||||
# # cleanup
|
||||
# sudo apt autoremove -y
|
||||
# export DEBIAN_FRONTEND=readline
|
||||
32
setup.sh
32
setup.sh
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
dir=`dirname "$0"`
|
||||
source "$dir/colors.sh"
|
||||
printf "${C_CYAN}andrejusk/dotfiles${C_NC}\n"
|
||||
|
||||
# Check if running
|
||||
lock_file="$dir/setup.lock"
|
||||
if [ -f "$dir/.lock" ]; then
|
||||
printf "${C_RED}Script already running${C_NC}\n"
|
||||
exit 1
|
||||
elif
|
||||
touch
|
||||
fi
|
||||
|
||||
# Check for root
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
printf "${C_RED}Called without sudo, please run:${C_NC}\n"
|
||||
printf "sudo !!\n\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run all install scripts
|
||||
install_dir="$dir/install"
|
||||
for script in $install_dir/*.sh;
|
||||
do
|
||||
if [ -f "$script.lock" ]; then
|
||||
printf "$script\n"
|
||||
fi
|
||||
printf $script
|
||||
# sh $script;
|
||||
|
||||
done
|
||||
@@ -1,3 +1,5 @@
|
||||
indent() { sed 's/^/ /'; }
|
||||
|
||||
C_BLACK='\033[0;30m'
|
||||
C_DGRAY='\033[1;30m'
|
||||
C_RED='\033[0;31m'
|
||||
Reference in New Issue
Block a user