Browse Source

Add licenses.

xmkb
CrossR 4 years ago
parent
commit
cd194dbac4
  1. 4
      docs/static/setup.ps1
  2. 9
      docs/static/setup.sh

4
docs/static/setup.ps1 vendored

@ -1,3 +1,7 @@
# Copyright (c) 2020 The ZMK Contributors
#
# SPDX-License-Identifier: MIT
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
function Get-Choice-From-Options { function Get-Choice-From-Options {

9
docs/static/setup.sh vendored

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
# Copyright (c) 2020 The ZMK Contributors
#
# SPDX-License-Identifier: MIT
set -e set -e
check_exists() { check_exists() {
@ -148,9 +152,10 @@ git commit -m "Initial User Config."
if [ -n "$github_repo" ]; then if [ -n "$github_repo" ]; then
git remote add origin "$github_repo" git remote add origin "$github_repo"
git push --set-upstream origin "$(git symbolic-ref --short HEAD)" git push --set-upstream origin "$(git symbolic-ref --short HEAD)"
push_return_code=$?
# If push failed, assume that the origin was incorrect and give instructions on fixing. # If push failed, assume that the origin was incorrect and give instructions on fixing.
if [ $? -ne 0 ] { if [ ${push_return_code} -ne 0 ]; then
echo "Remote repository $github_repo not found..." echo "Remote repository $github_repo not found..."
echo "Check GitHub URL, and try adding again." echo "Check GitHub URL, and try adding again."
echo "Run the following: " echo "Run the following: "
@ -159,7 +164,7 @@ if [ -n "$github_repo" ]; then
echo " git push --set-upstream origin $(git symbolic-ref --short HEAD)" echo " git push --set-upstream origin $(git symbolic-ref --short HEAD)"
echo "Once pushed, your firmware should be availalbe from GitHub Actions at: ${github_repo%.git}/actions" echo "Once pushed, your firmware should be availalbe from GitHub Actions at: ${github_repo%.git}/actions"
exit 1 exit 1
} fi
# TODO: Support determing the actions URL when non-https:// repo URL is used. # TODO: Support determing the actions URL when non-https:// repo URL is used.
if [ "${github_repo}" != "${github_repo#https://}" ]; then if [ "${github_repo}" != "${github_repo#https://}" ]; then

Loading…
Cancel
Save