1
0
Fork 0
dotfiles/home/programs/scripts/copy-git-repo-contents
2023-07-29 01:37:08 +02:00

19 lines
440 B
Bash
Executable file

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils findutils rsync
# shellcheck disable=SC1008
current="$PWD"
src="$(realpath "$1")"
dst="$(realpath "$2")"
cd "$dst" || exit
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" || exit
# vim: set ft=sh: