12 lines
352 B
Fish
Executable file
12 lines
352 B
Fish
Executable file
#!/bin/env fish
|
|
begin
|
|
set -l target "$argv[1]"
|
|
set -l dir "$(status dirname)/.."
|
|
git clone "$dir" "$target"
|
|
git -C "$dir" diff HEAD | git -C "$target" apply --allow-empty &> /dev/null
|
|
|
|
and git -C "$dir" ls-files --exclude-standard --others | \
|
|
while read file
|
|
and cp "$dir/$file" "$target/$file"
|
|
end
|
|
end
|