1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-24 08:52:28 +02:00

Fixed errors regarding the installation script (#6644)

install.sh: fix bash error

Error 1:
./install.sh: 26: [[: not found

Error 2:
docker: 'compose' is not a docker command.

Signed-off-by: Peppe289 <gsperanza204@protonmail.com>
This commit is contained in:
Giuseppe Speranza 2024-01-28 01:50:12 +01:00 committed by GitHub
parent e9333837bf
commit e2ac019f51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,8 @@ download_dot_env_file() {
}
replace_env_value() {
if [[ "$OSTYPE" == "darwin"* ]]; then
KERNEL="$(uname -s | tr '[:upper:]' '[:lower:]')"
if [ "$KERNEL" = "darwin" ]; then
sed -i '' "s|$1=.*|$1=$2|" ./.env
else
sed -i "s|$1=.*|$1=$2|" ./.env
@ -39,9 +40,9 @@ populate_upload_location() {
start_docker_compose() {
echo "Starting Immich's docker containers"
if docker compose &>/dev/null; then
if docker compose > /dev/null 2>&1; then
docker_bin="docker compose"
elif docker-compose &>/dev/null; then
elif docker-compose > /dev/null 2>&1; then
docker_bin="docker-compose"
else
echo 'Cannot find `docker compose` or `docker-compose`.'