feat: debian setup, codepsaces install
This commit is contained in:
@@ -15,10 +15,10 @@ A local repository can be installed by running:
|
||||
### Automated setup
|
||||
|
||||
This repository can be installed without a local copy
|
||||
by invoking the `setup` script directly via `curl`:
|
||||
by invoking the `setup-new` script directly via `curl`:
|
||||
|
||||
# Inspect source
|
||||
curl -s https://raw.githubusercontent.com/andrejusk/dotfiles/HEAD/script/setup | less
|
||||
curl -s https://raw.githubusercontent.com/andrejusk/dotfiles/HEAD/script/setup-new | less
|
||||
|
||||
# Run
|
||||
curl -s https://raw.githubusercontent.com/andrejusk/dotfiles/HEAD/script/setup | bash
|
||||
curl -s https://raw.githubusercontent.com/andrejusk/dotfiles/HEAD/script/setup-new | bash
|
||||
|
||||
@@ -5,6 +5,9 @@ set -eo pipefail
|
||||
# Script to run all install scripts contained in install.d
|
||||
#
|
||||
|
||||
printf "\n\t <<< dots installer >>>\n"
|
||||
printf "\t========================\n\n\n"
|
||||
|
||||
# Prevent running as root
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
echo "Failed: Running as sudo. Please run as user"
|
||||
|
||||
@@ -16,4 +16,6 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
brew --version
|
||||
|
||||
unset NONINTERACTIVE
|
||||
else
|
||||
echo "Skipping: Not macOS"
|
||||
fi
|
||||
|
||||
@@ -12,9 +12,7 @@ if command -v apt-get &> /dev/null; then
|
||||
gnupg2
|
||||
)
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
apt_packages=($(comm -13 <(printf "%s\n" "${apt_packages[@]}" | sort) <(dpkg --get-selections | awk '{print $1}' | sort)))
|
||||
sudo apt-get update -qq
|
||||
if [ ${#apt_packages[@]} -gt 0 ]; then
|
||||
sudo apt-get install -qq "${apt_packages[@]}"
|
||||
fi
|
||||
@@ -23,3 +21,6 @@ if command -v apt-get &> /dev/null; then
|
||||
else
|
||||
echo "Skipping: apt-get not found"
|
||||
fi
|
||||
|
||||
apt --version
|
||||
echo "Last updated: $(ls -l /var/lib/apt/periodic/update-success-stamp | awk '{print $6" "$7" "$8}')"
|
||||
|
||||
@@ -40,3 +40,9 @@ export POWERLEVEL10K="$ZSH/custom/themes/powerlevel10k"
|
||||
if [ ! -d "$POWERLEVEL10K" ]; then
|
||||
git clone -q --depth=1 https://github.com/romkatv/powerlevel10k.git $POWERLEVEL10K
|
||||
fi
|
||||
|
||||
# change default shell to zsh
|
||||
if [[ "$SHELL" != *zsh ]]; then
|
||||
sudo chsh -s "$(command -v zsh)" "$(whoami)"
|
||||
sudo usermod -s "$(command -v zsh)" "$(whoami)"
|
||||
fi
|
||||
|
||||
@@ -25,7 +25,6 @@ if ! command -v "pyenv" &> /dev/null; then
|
||||
liblzma-dev
|
||||
zlib1g-dev
|
||||
)
|
||||
pyenv_packages=($(comm -13 <(printf "%s\n" "${pyenv_packages[@]}" | sort) <(dpkg --get-selections | awk '{print $1}' | sort)))
|
||||
if [ ${#pyenv_packages[@]} -gt 0 ]; then
|
||||
sudo apt-get install -qq "${pyenv_packages[@]}"
|
||||
fi
|
||||
@@ -50,6 +49,8 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
unset virtualenv_path
|
||||
fi
|
||||
|
||||
eval "$(pyenv init --path)"
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
|
||||
pyenv --version
|
||||
|
||||
@@ -18,6 +18,4 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
echo "Adding user to docker group"
|
||||
sudo usermod -aG docker "$USER"
|
||||
fi
|
||||
|
||||
unset docker_group
|
||||
fi
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
if ! command -v "neofetch" &>/dev/null; then
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
sudo apt-get install -qq neofetch
|
||||
sudo apt-get install neofetch -qq
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
brew install neofetch
|
||||
fi
|
||||
|
||||
@@ -18,12 +18,6 @@
|
||||
"repository": "https://packages.cloud.google.com/apt",
|
||||
"components": "cloud-sdk main"
|
||||
},
|
||||
{
|
||||
"key": "google-k8s",
|
||||
"signingKey": "https://packages.cloud.google.com/apt/doc/apt-key.gpg",
|
||||
"repository": "https://apt.kubernetes.io/",
|
||||
"components": "kubernetes-xenial main"
|
||||
},
|
||||
{
|
||||
"key": "docker",
|
||||
"signingKey": "https://download.docker.com/linux/debian/gpg",
|
||||
|
||||
@@ -39,7 +39,7 @@ fi
|
||||
|
||||
# Read GitHub repository and branch from environment variables
|
||||
author=${GITHUB_AUTHOR:-andrejusk}
|
||||
repository=${GITHUB_REPOSITORY:-dotfiles}
|
||||
repository=${GITHUB_REPO:-dotfiles}
|
||||
branch=${GITHUB_BRANCH:-master}
|
||||
|
||||
# Check if repository and branch exists
|
||||
Reference in New Issue
Block a user