feat: debian setup, codepsaces install
This commit is contained in:
@@ -15,10 +15,10 @@ A local repository can be installed by running:
|
|||||||
### Automated setup
|
### Automated setup
|
||||||
|
|
||||||
This repository can be installed without a local copy
|
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
|
# 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
|
# 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
|
# 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
|
# Prevent running as root
|
||||||
if [[ $EUID -eq 0 ]]; then
|
if [[ $EUID -eq 0 ]]; then
|
||||||
echo "Failed: Running as sudo. Please run as user"
|
echo "Failed: Running as sudo. Please run as user"
|
||||||
|
|||||||
@@ -16,4 +16,6 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
|
|||||||
brew --version
|
brew --version
|
||||||
|
|
||||||
unset NONINTERACTIVE
|
unset NONINTERACTIVE
|
||||||
|
else
|
||||||
|
echo "Skipping: Not macOS"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -12,9 +12,7 @@ if command -v apt-get &> /dev/null; then
|
|||||||
gnupg2
|
gnupg2
|
||||||
)
|
)
|
||||||
|
|
||||||
sudo apt-get update
|
sudo apt-get update -qq
|
||||||
|
|
||||||
apt_packages=($(comm -13 <(printf "%s\n" "${apt_packages[@]}" | sort) <(dpkg --get-selections | awk '{print $1}' | sort)))
|
|
||||||
if [ ${#apt_packages[@]} -gt 0 ]; then
|
if [ ${#apt_packages[@]} -gt 0 ]; then
|
||||||
sudo apt-get install -qq "${apt_packages[@]}"
|
sudo apt-get install -qq "${apt_packages[@]}"
|
||||||
fi
|
fi
|
||||||
@@ -23,3 +21,6 @@ if command -v apt-get &> /dev/null; then
|
|||||||
else
|
else
|
||||||
echo "Skipping: apt-get not found"
|
echo "Skipping: apt-get not found"
|
||||||
fi
|
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
|
if [ ! -d "$POWERLEVEL10K" ]; then
|
||||||
git clone -q --depth=1 https://github.com/romkatv/powerlevel10k.git $POWERLEVEL10K
|
git clone -q --depth=1 https://github.com/romkatv/powerlevel10k.git $POWERLEVEL10K
|
||||||
fi
|
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
|
liblzma-dev
|
||||||
zlib1g-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
|
if [ ${#pyenv_packages[@]} -gt 0 ]; then
|
||||||
sudo apt-get install -qq "${pyenv_packages[@]}"
|
sudo apt-get install -qq "${pyenv_packages[@]}"
|
||||||
fi
|
fi
|
||||||
@@ -50,6 +49,8 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|||||||
unset virtualenv_path
|
unset virtualenv_path
|
||||||
fi
|
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
|
pyenv --version
|
||||||
|
|||||||
@@ -18,6 +18,4 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|||||||
echo "Adding user to docker group"
|
echo "Adding user to docker group"
|
||||||
sudo usermod -aG docker "$USER"
|
sudo usermod -aG docker "$USER"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset docker_group
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
if ! command -v "neofetch" &>/dev/null; then
|
if ! command -v "neofetch" &>/dev/null; then
|
||||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
sudo apt-get install -qq neofetch
|
sudo apt-get install neofetch -qq
|
||||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
brew install neofetch
|
brew install neofetch
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -18,12 +18,6 @@
|
|||||||
"repository": "https://packages.cloud.google.com/apt",
|
"repository": "https://packages.cloud.google.com/apt",
|
||||||
"components": "cloud-sdk main"
|
"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",
|
"key": "docker",
|
||||||
"signingKey": "https://download.docker.com/linux/debian/gpg",
|
"signingKey": "https://download.docker.com/linux/debian/gpg",
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ fi
|
|||||||
|
|
||||||
# Read GitHub repository and branch from environment variables
|
# Read GitHub repository and branch from environment variables
|
||||||
author=${GITHUB_AUTHOR:-andrejusk}
|
author=${GITHUB_AUTHOR:-andrejusk}
|
||||||
repository=${GITHUB_REPOSITORY:-dotfiles}
|
repository=${GITHUB_REPO:-dotfiles}
|
||||||
branch=${GITHUB_BRANCH:-master}
|
branch=${GITHUB_BRANCH:-master}
|
||||||
|
|
||||||
# Check if repository and branch exists
|
# Check if repository and branch exists
|
||||||
Reference in New Issue
Block a user