1
0
Fork 0
dotfiles/home/programs/scripts/copy-git-repo-contents

16 lines
377 B
Text
Raw Normal View History

2022-08-30 15:39:48 +00:00
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils findutils rsync
current="$PWD"
src="$(realpath "$1")"
dst="$(realpath "$2")"
cd "$dst"
find . -not -path './.git/*' -not -path './.git' -not -path '.' -not -path '..' -print0 | xargs -0 rm -rf
rsync -ax "$src/" ./ --exclude .git --exclude deps --exclude _build
rm -rf ./.gitlab
rm -f ./.gitlab-ci.yml
cd "$current"