Compare commits

..

No commits in common. "8b80663a32395044de2120e96c07ff11588a4cff" and "2e7ccdbe25e601f6cd93817f3183964a091ca365" have entirely different histories.

2 changed files with 7 additions and 29 deletions

View file

@ -21,13 +21,7 @@ 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 ## `--overwrite` - Overwrite existing configuration files
```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
```sh ```sh
./install.sh --example=n ./install.sh --example=n
``` ```

View file

@ -7,7 +7,6 @@ dir=""
host="" host=""
user="" user=""
seed="" seed=""
install=""
password="" password=""
seed_host="" seed_host=""
seed_user="" seed_user=""
@ -49,15 +48,12 @@ install_reflect() {
exit 1 exit 1
fi fi
# Download and install the Reflect repository
if [[ "$install" != "n" ]]; then
if ! [ -d "reflect" ] ; then if ! [ -d "reflect" ] ; then
git submodule add https://codeberg.org/reflect/reflect git submodule add https://codeberg.org/reflect/reflect
fi fi
# Update submodules # Update submodules
git submodule update --init --recursive git submodule update --init --recursive
fi
# Install dependencies with composer # Install dependencies with composer
(cd reflect && composer install --classmap-authoritative) (cd reflect && composer install --classmap-authoritative)
@ -65,15 +61,8 @@ install_reflect() {
# Bail out if composer didn't create a vendor folder # Bail out if composer didn't create a vendor folder
if ! [ -d "reflect/vendor" ] ; then if ! [ -d "reflect/vendor" ] ; then
echo_err "Something went wrong with the installation." echo_err "Something went wrong with the installation."
# Script was not run with the install flag disabled, this is probably a bug
if [[ "$install" != "n" ]]; then
exit_report exit_report
fi fi
echo_err "Make sure you have cloned the Reflect repository. Or run without '--install=n'."
exit 1
fi
} }
configure_reflect() { configure_reflect() {
@ -209,7 +198,6 @@ main() {
cwd=$(pwd) cwd=$(pwd)
check_sys_depend check_sys_depend
install_reflect install_reflect
configure_reflect configure_reflect
@ -244,10 +232,6 @@ for arg in "$@"; do
seed="${arg#*=}" seed="${arg#*=}"
;; ;;
--install=*)
install="${arg#*=}"
;;
--seed-host=*) --seed-host=*)
seed_host="${arg#*=}" seed_host="${arg#*=}"
;; ;;