PortValhalla/scripts/lib/copy-repo.fish

12 lines
371 B
Fish
Raw Permalink Normal View History

2024-07-07 20:33:01 +00:00
#!/bin/env fish
begin
set -l target "$argv[1]"
2024-12-04 18:06:32 +00:00
set -l dir "$(status dirname)/../.."
2024-07-07 20:33:01 +00:00
git clone "$dir" "$target"
2024-07-26 12:43:02 +00:00
cp "$dir/.git/config" "$target/.git/config"
2024-10-06 19:25:34 +00:00
git -C "$dir" diff HEAD | git -C "$target" apply --allow-empty &>/dev/null
2024-07-07 20:33:01 +00:00
2024-10-06 19:25:34 +00:00
and git -C "$dir" ls-files --exclude-standard --others |
2024-07-15 23:33:08 +00:00
rsync --files-from=/dev/stdin "$dir" "$target"
2024-07-07 20:33:01 +00:00
end