Script: add copy-git-repo-contents
This commit is contained in:
parent
1ebc4ae3b6
commit
2f93d6765f
1 changed files with 15 additions and 0 deletions
15
home/programs/scripts/copy-git-repo-contents
Executable file
15
home/programs/scripts/copy-git-repo-contents
Executable 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"
|
Loading…
Reference in a new issue