Adapt to new repository
This commit is contained in:
22
README.md
22
README.md
@@ -1,16 +1,19 @@
|
|||||||
# macOS System
|
# macOS System
|
||||||
|
|
||||||
Scripts to align a macOS system to Astzweig system configuration.
|
Scripts to align a macOS system to Astzweig system configuration.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
/bin/zsh -c "$(curl -fsSL https://raw.githubusercontent.com/astzweig/macos-system/main/bootstrap.sh)"
|
/bin/zsh -c "$(curl -fsSL https://git.tabshift.dev/spacebar/macos-system/raw/branch/main/bootstrap.sh)"
|
||||||
```
|
```
|
||||||
|
|
||||||
## What it does
|
## What it does
|
||||||
|
|
||||||
1. Run all setup from a temporary directory and delete it in the end
|
1. Run all setup from a temporary directory and delete it in the end
|
||||||
|
|
||||||
## Process
|
## Process
|
||||||
|
|
||||||
1. `install.sh` queries all modules for their required information
|
1. `install.sh` queries all modules for their required information
|
||||||
1. The modules print their required information to stdout using the format as described below.
|
1. The modules print their required information to stdout using the format as described below.
|
||||||
1. `install.sh` parses those informations and tries to read them from a configuration file.
|
1. `install.sh` parses those informations and tries to read them from a configuration file.
|
||||||
@@ -18,14 +21,17 @@ Scripts to align a macOS system to Astzweig system configuration.
|
|||||||
1. `install.sh` then runs the modules with their required informations passed in as parameter values.
|
1. `install.sh` then runs the modules with their required informations passed in as parameter values.
|
||||||
|
|
||||||
## License exclusion
|
## License exclusion
|
||||||
|
|
||||||
The license does not cover the file [Astzweig.png](resources/user-pictures/Astzweig.png).
|
The license does not cover the file [Astzweig.png](resources/user-pictures/Astzweig.png).
|
||||||
|
|
||||||
## Required Information Format
|
## Required Information Format
|
||||||
|
|
||||||
Modules must print their required information to stdout if they're called with
|
Modules must print their required information to stdout if they're called with
|
||||||
`show-questions` command. Required information are all information the module
|
`show-questions` command. Required information are all information the module
|
||||||
might want to ask the user in order to configure some aspect of the system.
|
might want to ask the user in order to configure some aspect of the system.
|
||||||
|
|
||||||
### Schema
|
### Schema
|
||||||
|
|
||||||
The general schema is:
|
The general schema is:
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
@@ -33,14 +39,15 @@ The general schema is:
|
|||||||
s: --highlight-color=What color shall your system highlight color be? # choose from: blue,red,light green;
|
s: --highlight-color=What color shall your system highlight color be? # choose from: blue,red,light green;
|
||||||
p: --user-password=What color shall your system highlight color be?
|
p: --user-password=What color shall your system highlight color be?
|
||||||
```
|
```
|
||||||
|
|
||||||
The letter at the beginning is the question type:
|
The letter at the beginning is the question type:
|
||||||
|
|
||||||
| Question type | Description | Arguments |
|
| Question type | Description | Arguments |
|
||||||
| ------------- | ----------- | --------- |
|
| ------------- | ------------------------------------------------------------------ | ---------------------------------------------------------------- |
|
||||||
| i (info) | A question where the user has no restrictions on input | `default`: a default answer. |
|
| i (info) | A question where the user has no restrictions on input | `default`: a default answer. |
|
||||||
| p (password) | A question where the user input is not printed to standard output. | - |
|
| p (password) | A question where the user input is not printed to standard output. | - |
|
||||||
| c (confirm) | A yes/no question where the user is allowed to answer yes or no. | - |
|
| c (confirm) | A yes/no question where the user is allowed to answer yes or no. | - |
|
||||||
| s (select) | A list of choices where the user can select one using numbers. | `choose from`: a comma separated list of possible select values. |
|
| s (select) | A list of choices where the user can select one using numbers. | `choose from`: a comma separated list of possible select values. |
|
||||||
|
|
||||||
`<PARAMETER NAME>` is the the parameter name, that will receive the user answer
|
`<PARAMETER NAME>` is the the parameter name, that will receive the user answer
|
||||||
when the module is called. Single char parameter names will be prefixed with a
|
when the module is called. Single char parameter names will be prefixed with a
|
||||||
@@ -50,4 +57,5 @@ the parameter name `highlight-color` becomes `--highlight-color <user response>`
|
|||||||
`<QUESTION>` must contain any punctuation you want to show.
|
`<QUESTION>` must contain any punctuation you want to show.
|
||||||
|
|
||||||
[^zshlib-askUser]: Currently supported: info, password, confirm, choose. They map to [zshlib/askUser][zshlib-overview] commands.
|
[^zshlib-askUser]: Currently supported: info, password, confirm, choose. They map to [zshlib/askUser][zshlib-overview] commands.
|
||||||
|
|
||||||
[zshlib-overview]: https://github.com/astzweig/zshlib#whats-included
|
[zshlib-overview]: https://github.com/astzweig/zshlib#whats-included
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ function ensureDocopts() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cloneMacOSSystemRepo() {
|
function cloneMacOSSystemRepo() {
|
||||||
local repoUrl="${MACOS_SYSTEM_REPO_URL:-https://github.com/astzweig/macos-system.git}"
|
local repoUrl="${MACOS_SYSTEM_REPO_URL:-https://git.tabshift.dev/spacebar/macos-system.git}"
|
||||||
git clone --depth 1 -q "${repoUrl}" . 2> /dev/null || return 10
|
git clone --depth 1 -q "${repoUrl}" . 2> /dev/null || return 10
|
||||||
[ -n "${MACOS_SYSTEM_REPO_BRANCH}" ] && git checkout -q ${MACOS_SYSTEM_REPO_BRANCH} 2> /dev/null || true
|
[ -n "${MACOS_SYSTEM_REPO_BRANCH}" ] && git checkout -q ${MACOS_SYSTEM_REPO_BRANCH} 2> /dev/null || true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user