Przeglądaj źródła

fix start.sh and stop.sh on ubuntu with zsh

moved to bash instead of sh
rewrite testing for existing file and directory so that hopefully it works on both Linux and MacOs
tags/5.2-RC1
Sébastien Lesaint 9 lat temu
rodzic
commit
3dbfee3fe1
2 zmienionych plików z 6 dodań i 4 usunięć
  1. 5
    3
      start.sh
  2. 1
    1
      stop.sh

+ 5
- 3
start.sh Wyświetl plik

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

if [[ "$OSTYPE" == "darwin"* ]]; then
OS='macosx-universal-64'
@@ -6,13 +6,15 @@ else
OS='linux-x86-64'
fi

if ! ls sonar-application/target/sonarqube-*.zip &> /dev/null; then
ls sonar-application/target/sonarqube-*.zip 1> /dev/null 2>&1
if [ "$?" != "0" ]; then
echo 'Sources are not built'
./build.sh
fi

cd sonar-application/target/
if ! ls sonarqube-*/bin/$OS/sonar.sh &> /dev/null; then
ls sonarqube-*/bin/$OS/sonar.sh 1> /dev/null 2>&1
if [ "$?" != "0" ]; then
unzip sonarqube-*.zip
fi
cd sonarqube-*

+ 1
- 1
stop.sh Wyświetl plik

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

# Shortcut to stop server. It must be already built.


Ładowanie…
Anuluj
Zapisz