PortValhalla/scripts/copy-repo.fish

13 lines
352 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-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-07 20:33:01 +00:00
while read file
2024-07-07 23:03:21 +00:00
and cp "$dir/$file" "$target/$file"
2024-07-07 20:33:01 +00:00
end
end