2021-12-14 10:51:17 -08:00
|
|
|
# Create and maintain a minimal git repo at the root of the copied src
|
|
|
|
(
|
2022-08-16 12:00:00 -07:00
|
|
|
# shellcheck disable=SC2154,SC2164
|
2021-12-14 10:51:17 -08:00
|
|
|
cd "$scriptDir/.."
|
|
|
|
amend=--amend
|
2022-08-16 12:00:00 -07:00
|
|
|
|
2022-08-28 08:52:47 -07:00
|
|
|
if [[ ! -e .git ]] || ! git rev-parse HEAD 2>/dev/null; then
|
2021-12-14 10:51:17 -08:00
|
|
|
git init
|
|
|
|
amend=
|
|
|
|
fi
|
|
|
|
git add .
|
|
|
|
if ! git diff --quiet --cached; then
|
2022-08-16 12:00:00 -07:00
|
|
|
git commit -a "$amend" -m -
|
2021-12-14 10:51:17 -08:00
|
|
|
fi
|
|
|
|
) >/dev/null
|