Rewrite install script
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
clean
|
||||
update
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
bash_source="$dotfiles_dir/bash"
|
||||
bash_target="$HOME"
|
||||
link_folder "$bash_source" "$bash_target"
|
||||
echo "bash dotfiles are linked"
|
||||
|
||||
source "$HOME/.bashrc"
|
||||
echo "bashrc sourced"
|
||||
|
||||
sudo chmod -R 0644 /etc/update-motd.d/
|
||||
|
||||
bash --version
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
if not_installed "fish"; then
|
||||
echo "installing fish..."
|
||||
add_ppa "fish-shell/release-3"
|
||||
update
|
||||
install fish
|
||||
|
||||
fi
|
||||
echo "fish is installed"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
# ssh key exists
|
||||
ssh_target="$HOME/.ssh"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
# git dotfiles are symlinked
|
||||
git_source="$dotfiles_dir/git"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
# pyenv is installed
|
||||
if not_installed "pyenv"; then
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
# python3 and pip3 are installed
|
||||
if not_installed "pip3"; then
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
# poetry is installed
|
||||
if not_installed "poetry"; then
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
# nvm is installed
|
||||
if not_installed "nvm"; then
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
# yarn is installed
|
||||
if not_installed "yarn"; then
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
if not_installed "java"; then
|
||||
echo "Installing java..."
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
vim_source="$dotfiles_dir/vim"
|
||||
vim_target="$XDG_CONFIG_HOME/nvim"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
if not_installed "elm"; then
|
||||
curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
# docker is installed
|
||||
DOCKER_FOLDER="$HOME/.docker"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
if not_installed "firebase"; then
|
||||
echo "Installing firebase..."
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||
unzip awscliv2.zip -d "$dotfiles_dir/tmp"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
if not_installed "terraform"; then
|
||||
echo "Installing terraform..."
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
echo "cleaning"
|
||||
clean
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname $0)/utils.sh"
|
||||
|
||||
if not_installed "screenfetch"; then
|
||||
echo "Installing screenfetch..."
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# ---------------------------------------------------------------------------- #
|
||||
# Helper variables #
|
||||
# ---------------------------------------------------------------------------- #
|
||||
install_dir="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )";
|
||||
dotfiles_dir="$(dirname "$install_dir")";
|
||||
|
||||
# ---------------------------------------------------------------------------- #
|
||||
# Helper functions
|
||||
# ---------------------------------------------------------------------------- #
|
||||
@@ -8,28 +14,28 @@ clean() {
|
||||
}
|
||||
|
||||
update() {
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get update
|
||||
}
|
||||
|
||||
# Non-interactive upgrade
|
||||
# Skip if FAST_MODE is defined
|
||||
upgrade() {
|
||||
[ "$FAST_MODE" != false ] && return
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
sudo apt-get dist-upgrade -qq \
|
||||
sudo apt-get \
|
||||
-o Dpkg::Options::="--force-confdef" \
|
||||
-o Dpkg::Options::="--force-confold"
|
||||
-o Dpkg::Options::="--force-confold" \
|
||||
-y \
|
||||
dist-upgrade
|
||||
}
|
||||
|
||||
# @arg $1 packages to install
|
||||
install() {
|
||||
sudo apt-get install -qq $1
|
||||
sudo apt-get install $1
|
||||
refresh
|
||||
}
|
||||
|
||||
# @arg $1 package list file to install
|
||||
install_file() {
|
||||
sudo apt-get install -fqq $(cat $1)
|
||||
sudo apt-get install -f $(cat $1)
|
||||
refresh
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user