Last active
December 9, 2025 13:55
-
-
Save pomartel/9c597f21340ce153e381c51b20a78956 to your computer and use it in GitHub Desktop.
Script that initializes an existing yadm git repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/bash | |
| REPO_URL="git@github.com:pomartel/config-files.git" | |
| if ! command -v yadm >/dev/null 2>&1; then | |
| pacman -S --noconfirm yadm | |
| fi | |
| REPO_DIR="$HOME/.local/share/yadm/repo.git" | |
| # Only clone if the repo directory doesn't already exist | |
| echo "Cloning yadm repository: $REPO_URL" | |
| yadm clone -f "$REPO_URL" | |
| echo "Force-resetting work-tree (discarding local conflicting files)..." | |
| yadm reset --hard | |
| echo "Done. Local dotfiles now exactly match the yadm repo." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment