PortValhalla/scripts/copy-repo.sh

15 lines
360 B
Bash
Executable file

#!/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 "$@";