boxes/boxes/devbox/scripts/fetch_dots
aleidk 5eb1cb2618
All checks were successful
Publish image / Generate job matrices (push) Successful in 8s
Publish image / create-docker-images (map[name:devbox path:boxes/devbox]) (push) Successful in 3m18s
feat: add dotfiles auto setup on box creation
2024-11-11 16:25:34 -03:00

28 lines
435 B
Bash

#!/usr/bin/env bash
set -e pipefail
base_dir="$HOME/Repos/Private/"
mkdir -p "$base_dir"
cd "$base_dir" || exit
if [ -d dots ]; then
echo "Dots already exists, updating..."
cd dots || exit
git pull
else
git clone ssh://git@git.alecodes.page:24062/alecodes/dots.git
cd dots || exit
git checkout dotter-migration
fi
echo "Fixing permissions..."
chown -R 1000:1000 "$base_dir"
echo "Deploying dots..."
dotter deploy