mirror of
https://mau.dev/andreijiroh-dev/dotfiles.git
synced 2024-11-10 00:59:38 +00:00
chore(yadm): update README and add post-clone bootstrap script
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.eu.org>
This commit is contained in:
parent
fddff5a696
commit
738b7684cb
2 changed files with 26 additions and 4 deletions
|
@ -1,9 +1,15 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -d "$HOME/.git" ]; then
|
||||
set -x
|
||||
|
||||
if [ ! -d "$HOME/.git" ] && [ -d "$HOME/.local/share/yadm/repo.git" ]; then
|
||||
echo "Symlinking ~/.git to ~/.local/share/yadm/repo.git for compatibility"
|
||||
ln -s ~/.local/share/yadm/repo.git ~/.git
|
||||
elif [ -d "$HOME/.git" ] && [ ! -d "$HOME/.local/share/yadm/repo.git" ]; then
|
||||
echo "Symlinking ~/.local/share/yadm/repo.git to ~/.git for compatibility"
|
||||
ln -s ~/.git ~/.local/share/yadm/repo.git
|
||||
fi
|
||||
|
||||
git remote set-url origin ssh://git@mau.dev/andreijiroh.dev/dotfiles
|
||||
git remote add hut ssh://git@git.sr.ht/~ajhalili2006/dotfiles
|
||||
echo "Setting git remote URLs to SSH"
|
||||
git remote set-url origin ssh://git@mau.dev/andreijiroh.dev/dotfiles || true
|
||||
git remote set-url hut ssh://git@git.sr.ht/~ajhalili2006/dotfiles || true
|
||||
|
|
16
README.md
16
README.md
|
@ -26,6 +26,22 @@ to how mirroring work and usualy pushed there first)
|
|||
|
||||
## Setup
|
||||
|
||||
### With yadm
|
||||
|
||||
```shell
|
||||
# on a Alpine Linux sandbox VM (or chroot)
|
||||
apk add yadm git gnupg
|
||||
|
||||
yadm clone https://mau.dev/andreijiroh.dev/dotfiles
|
||||
yadm restore --staged $HOME
|
||||
yadm checkout -- $HOME
|
||||
|
||||
# run the bootstrap script
|
||||
yadm bootstrap
|
||||
```
|
||||
|
||||
### Without yadm
|
||||
|
||||
It's easy, although this will be different because `git clone <clone-url-above>` will
|
||||
scream some errors when attempt to do so after creating a user with their own home directory.
|
||||
|
||||
|
|
Loading…
Reference in a new issue