From fa68505117215d5a49fa0a13bbc1ec5e07020138 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 3 Sep 2017 16:32:01 -0400 Subject: Rewrite checkout mod to drop remote support Also, refactored repo check to the repo-access mod. --- repo-access.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'repo-access.sh') diff --git a/repo-access.sh b/repo-access.sh index 2b6a5cc..b599dc8 100644 --- a/repo-access.sh +++ b/repo-access.sh @@ -1,3 +1,20 @@ +## +# systr_repo_check [=PATH] +# +# Assert that the local repository path exists and is valid. +## +function systr_repo_check +{ + if [ $# -gt 0 ]; then + path="$1" + fi + + if [ ! -f "$path/refs/HEAD" ]; then + echo "Fatal: $path is not a repository" >&2 + exit 1 + fi +} + ## # systr_repo_resolve_reference # -- cgit v1.2.3