mirror of
https://codeberg.org/reflect/install.git
synced 2025-09-14 10:13:42 +02:00
feat: add optional --install
named argument flag (#2)
This PR adds a new optional flag `--install` which when set to `--install=n` will skip download and installation of the Reflect git submodule. Reviewed-on: https://codeberg.org/reflect/install/pulls/2 Co-authored-by: vlw <victor@vlw.se> Co-committed-by: vlw <victor@vlw.se>
This commit is contained in:
parent
2e7ccdbe25
commit
ff5b177c67
2 changed files with 17 additions and 1 deletions
|
@ -21,6 +21,12 @@ curl -fsSL https://codeberg.org/reflect/install/raw/branch/master/install.sh | b
|
||||||
# Arguments
|
# Arguments
|
||||||
You can pass optional named arguments to this script for headless installation of Reflect.
|
You can pass optional named arguments to this script for headless installation of Reflect.
|
||||||
|
|
||||||
|
## `--install` - Don't install, only configure Reflect
|
||||||
|
```sh
|
||||||
|
./install.sh --install=n
|
||||||
|
```
|
||||||
|
Pass `--install=n` to prevent download and installation of the Reflect git submodule. Use this option if you're version controlling Reflect from your project repository.
|
||||||
|
|
||||||
## `--overwrite` - Overwrite existing configuration files
|
## `--overwrite` - Overwrite existing configuration files
|
||||||
```sh
|
```sh
|
||||||
./install.sh --example=n
|
./install.sh --example=n
|
||||||
|
|
12
install.sh
12
install.sh
|
@ -7,6 +7,7 @@ dir=""
|
||||||
host=""
|
host=""
|
||||||
user=""
|
user=""
|
||||||
seed=""
|
seed=""
|
||||||
|
install=""
|
||||||
password=""
|
password=""
|
||||||
seed_host=""
|
seed_host=""
|
||||||
seed_user=""
|
seed_user=""
|
||||||
|
@ -198,7 +199,12 @@ main() {
|
||||||
cwd=$(pwd)
|
cwd=$(pwd)
|
||||||
|
|
||||||
check_sys_depend
|
check_sys_depend
|
||||||
install_reflect
|
|
||||||
|
# Download and install the Reflect repository
|
||||||
|
if [[ "$install" != "n" ]]; then
|
||||||
|
install_reflect
|
||||||
|
fi
|
||||||
|
|
||||||
configure_reflect
|
configure_reflect
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -232,6 +238,10 @@ for arg in "$@"; do
|
||||||
seed="${arg#*=}"
|
seed="${arg#*=}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--install=*)
|
||||||
|
install="${arg#*=}"
|
||||||
|
;;
|
||||||
|
|
||||||
--seed-host=*)
|
--seed-host=*)
|
||||||
seed_host="${arg#*=}"
|
seed_host="${arg#*=}"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Reference in a new issue