Improve mirror-to-github documentation

This commit is contained in:
Florine W. Dekker 2023-01-31 12:39:00 +01:00
parent 9afa3e1779
commit f2cbcbdc72
Signed by: FWDekker
GPG Key ID: D3DCFAA8A4560BE0
1 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,8 @@
#!/usr/local/bin/bash
# $1= destination repository, including tokens
# Usage: `mirror-to-github $github_auth`
#
# Mirrors the entire repository with GitHub. Authentication happens using `$github_auth`, which has the form
# `https://<username>:<token>@github.com/<username>/<repository>.git`.
repo_url="$(pwd)"
repo_name="$(basename -s .git "$repo_url")"
@ -8,9 +11,10 @@ tmp_dir="$HOME/tmp/git/$repo_name-$(date +%s)"
echo "[[ Deploy ]] mirror-to-github($repo_name)"
echo "[[ Deploy ]] src: '$repo_url'"
echo "[[ Deploy ]] dst: '$dst_url'"
echo "[[ Deploy ]] dst: '[redacted]'"
echo "[[ Deploy ]] tmp: '$tmp_dir'"
if test -e "$tmp_dir"; then
echo "[[ Deploy ]] Directory '$tmp_dir' already exists, stopping deployment."
exit