]>
Commit | Line | Data |
---|---|---|
e94cd212 | 1 | #!/usr/bin/env bash |
90bfb9a8 IB |
2 | |
3 | set -e | |
4 | ||
5 | tmp=$(mktemp -d) | |
6 | git clone . $tmp | |
7 | cd $tmp | |
8 | ||
9 | trap "rm -rf $tmp" EXIT | |
10 | ||
11 | git remote add NUR gitolite@git.immae.eu:perso/Immae/Config/Nix/NUR | |
12 | git fetch --tags NUR | |
13 | # tag nur_root on perso/Immae/Config/Nix/NUR | |
14 | nur_root="252dd7d899b7a0deea1537cc5d2d48b825afffb0" | |
15 | # tag nur_publish on perso/Immae/Config/Nix | |
16 | first_commit="5145061e9b679ea1e5d2709d22d0ee53467fed15" | |
17 | git rebase --onto=$nur_root $first_commit master | |
18 | ||
e94cd212 IB |
19 | # The list below musn't get shrinked, it is used by filter-branch on |
20 | # every commit | |
90bfb9a8 | 21 | clean_folder=' |
fe696f35 IB |
22 | rm -rf config lib/private modules/private pkgs/private nixops |
23 | for broken in pkgs/crypto/cardano/default.nix; do | |
24 | if [ -f $broken ]; then | |
25 | rm -f $broken | |
26 | cat > $broken <<-EOF | |
27 | { runCommand, mylibs }: | |
28 | runCommand "empty" { preferLocalBuild = true; } "mkdir -p \$out" | |
29 | EOF | |
90bfb9a8 IB |
30 | fi |
31 | done | |
32 | ' | |
33 | ||
34 | git filter-branch --tree-filter "$clean_folder" --prune-empty master | |
35 | git push NUR +master |