PortValhalla/scripts/copy-repo.sh

15 lines
360 B
Bash
Raw Normal View History

2024-07-07 18:12:46 +00:00
#!/bin/bash
function copyRepo() {
local dir="${BASH_SOURCE%/*}/..";
local target="$1";
git clone "$dir" "$target";
git -C "$dir" diff HEAD | git -C "$target" apply --allow-empty;
git -C "$dir" ls-files --exclude-standard --others | \
while read file; do
cp "$dir/$file" "$target/$file";
done;
}
copyRepo "$@";