PortValhalla/scripts/copy-repo.fish

12 lines
371 B
Fish
Raw Normal View History

2024-07-07 20:33:01 +00:00
#!/bin/env fish
begin
set -l target "$argv[1]"
set -l dir "$(status dirname)/.."
git clone "$dir" "$target"
2024-07-26 12:43:02 +00:00
cp "$dir/.git/config" "$target/.git/config"
2024-07-08 00:48:10 +00:00
git -C "$dir" diff HEAD | git -C "$target" apply --allow-empty &> /dev/null
2024-07-07 20:33:01 +00:00
2024-07-07 23:03:21 +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