bootstrap/bootstrap-user.sh

24 lines
862 B
Bash
Raw Normal View History

2018-11-23 09:57:23 +01:00
#! /bin/bash
2023-10-17 13:25:13 +02:00
# SPDX-FileCopyrightText: 2023 Tobias Schmidl
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# fail immediately on error
set -e
2018-11-23 09:57:23 +01:00
TMPDIR=$(mktemp -u -p "$HOME" -d dotfiles.XXXXX) && \
2023-07-25 08:43:24 +02:00
git clone --separate-git-dir="$HOME/.cfg" https://git.schmidl.dev/schtobia/dotfiles.git "$TMPDIR" && \
2018-11-23 09:57:23 +01:00
[ -r "$TMPDIR/.gitmodules" ] && cp -vi "$TMPDIR/.gitmodules" "$HOME"
[ -d "$HOME/.cfg" ] && \
git --git-dir="$HOME/.cfg/" --work-tree="$HOME" config status.showUntrackedFiles no && \
2021-02-12 07:40:57 +01:00
(cd "$HOME" && \
2018-11-23 09:57:23 +01:00
git --git-dir="$HOME/.cfg/" --work-tree="$HOME" checkout -- . && \
git --git-dir="$HOME/.cfg/" --work-tree="$HOME" submodule update --init --remote --recursive --rebase)
2021-02-12 07:40:57 +01:00
rm -rf "$TMPDIR"
2018-11-23 09:57:23 +01:00
2023-07-25 08:43:24 +02:00
pip install --user -r https://git.schmidl.dev/schtobia/bootstrap/raw/branch/master/requirements.txt &&
2019-02-07 11:32:04 +01:00
2018-11-23 09:57:23 +01:00
# vim related
2021-09-22 11:09:15 +02:00
nvim +PluginInstall +UpdateRemotePlugins +qall