1
0
Fork 0

Script: add copy-git-repo-contents

This commit is contained in:
Daniel Kempkens 2022-08-30 17:39:48 +02:00
parent 1ebc4ae3b6
commit 2f93d6765f
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -0,0 +1,15 @@
#!/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"