diff options
author | Kellen Carey <kellen.carey@gmail.com> | 2020-10-09 18:00:11 -0700 |
---|---|---|
committer | Kellen Carey <kellen.carey@gmail.com> | 2020-10-09 18:00:11 -0700 |
commit | 10029c297ed8f6d97b582bc7382d9e9558808884 (patch) | |
tree | e00831a6bd3cf07a4b8d44ddc28a2be7908c6333 /docs/static | |
parent | 405ca7267fc0be9558836393bfe9945187016dd4 (diff) |
exit setup if no write permissions in directory
Diffstat (limited to 'docs/static')
-rw-r--r-- | docs/static/setup.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 49ed3eb..96e8768 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -22,6 +22,13 @@ check_exists "command -v curl" "curl is not installed, and is required for this check_exists "git config user.name" "Git username not set!\nRun: git config --global user.name 'My Name'" check_exists "git config user.email" "Git email not set!\nRun: git config --global user.email 'example@myemail.com'" +# Check to see if the user has write permissions in this directory to prevent a cryptic error later on +if [ ! -w `pwd` ]; then + echo 'Sorry, you do not have write permissions in this directory.'; + echo 'Please try running this script again from a directory that you do have write permissions for.'; + exit 1 +fi + repo_path="https://github.com/zmkfirmware/zmk-config-split-template.git" title="ZMK Config Setup:" |