nixos-dotfiles

nixos-dotfiles

https://git.tonybtw.com/nixos-dotfiles.git git://git.tonybtw.com/nixos-dotfiles.git
513 bytes raw
1
#!/bin/sh
2
set -e
3
4
DOTFILES="$HOME/nixos-dotfiles"
5
LIST="$DOTFILES/scripts/configs.txt"
6
7
cd "$DOTFILES"
8
9
while IFS='|' read -r src dst url; do
10
    [ -z "$url" ] && continue
11
    [ ! -d "$src" ] && continue
12
13
    echo "=== Fixing $src ==="
14
15
    git push "$url" "$(git subtree split --prefix="$src"):master" --force
16
    rm -rf "$src"
17
    git add -A
18
    git commit -m "Remove $src for subtree re-add"
19
    git subtree add --prefix="$src" "$url" master
20
21
done < "$LIST"
22
23
echo "Done. All subtrees now have proper history."