From 3ca8801af033ac41cec5c2acd067968436139317 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 19 Aug 2017 15:27:57 -0400 Subject: [PATCH] script fixes for mac --- .gitignore | 3 ++- build.sh | 20 +++++++++++++++++--- scripts/install.sh | 8 +++----- scripts/run-mac.sh | 2 +- scripts/run.sh | 2 +- scripts/update-db.sh | 2 +- src/Api/build.sh | 5 +++-- src/Identity/build.sh | 2 +- util/Attachments/build.sh | 2 +- util/MsSql/build.sh | 2 +- util/Nginx/build.sh | 2 +- util/Server/build.sh | 2 +- util/Setup/build.sh | 2 +- 13 files changed, 34 insertions(+), 20 deletions(-) mode change 100644 => 100755 src/Api/build.sh mode change 100644 => 100755 src/Identity/build.sh mode change 100644 => 100755 util/Attachments/build.sh mode change 100644 => 100755 util/MsSql/build.sh mode change 100644 => 100755 util/Nginx/build.sh mode change 100644 => 100755 util/Server/build.sh mode change 100644 => 100755 util/Setup/build.sh diff --git a/.gitignore b/.gitignore index 936864b96..28853353d 100644 --- a/.gitignore +++ b/.gitignore @@ -203,4 +203,5 @@ mail_dist/ *.refactorlog *.scmp src/Core/Properties/launchSettings.json -*.override.env \ No newline at end of file +*.override.env +**/*.DS_Store diff --git a/build.sh b/build.sh index 02fb93f90..ae2cfa5d6 100644 --- a/build.sh +++ b/build.sh @@ -1,15 +1,29 @@ #!/usr/bin/env bash set -e -DIR="$(dirname $(readlink -f $0))" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -echo -e "\nBuilding bitwarden" -echo -e "==================" +echo "" +echo "Building bitwarden" +echo "==================" +chmod u+x $DIR/src/Api/build.sh $DIR/src/Api/build.sh + +chmod u+x $DIR/src/Identity/build.sh $DIR/src/Identity/build.sh + +chmod u+x $DIR/util/Server/build.sh $DIR/util/Server/build.sh + +chmod u+x $DIR/util/Nginx/build.sh $DIR/util/Nginx/build.sh + +chmod u+x $DIR/util/Attachments/build.sh $DIR/util/Attachments/build.sh + +chmod u+x $DIR/util/MsSql/build.sh $DIR/util/MsSql/build.sh + +chmod u+x $DIR/util/Setup/build.sh $DIR/util/Setup/build.sh diff --git a/scripts/install.sh b/scripts/install.sh index ce12f6468..c4271210f 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -22,13 +22,11 @@ EOF docker --version echo "" -OUTPUT_DIR=/etc/bitwarden +OUTPUT_DIR=~/bitwarden mkdir -p $OUTPUT_DIR -echo -e "(!) Enter the domain name for your bitwarden instance (ex. bitwarden.company.com): " -read DOMAIN -echo -e "\n(!) Do you want to use Let's Encrypt to generate a free SSL certificate? (y/n): " -read LETS_ENCRYPT +read -p "(!) Enter the domain name for your bitwarden instance (ex. bitwarden.company.com): " DOMAIN +read -p "(!) Do you want to use Let's Encrypt to generate a free SSL certificate? (y/n): " LETS_ENCRYPT if [ $LETS_ENCRYPT == 'y' ] then diff --git a/scripts/run-mac.sh b/scripts/run-mac.sh index 0be1d073e..094b68449 100644 --- a/scripts/run-mac.sh +++ b/scripts/run-mac.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -DIR="$(dirname $(readlink -f $0))" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DOCKER_DIR=$DIR/../docker docker --version diff --git a/scripts/run.sh b/scripts/run.sh index f01612c33..77f3f0488 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -DIR="$(dirname $(readlink -f $0))" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DOCKER_DIR=$DIR/../docker docker --version diff --git a/scripts/update-db.sh b/scripts/update-db.sh index d3c8eec27..6f0b7d3ec 100644 --- a/scripts/update-db.sh +++ b/scripts/update-db.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -OUTPUT_DIR=/etc/bitwarden +OUTPUT_DIR=~/bitwarden docker run -it --rm --name setup --network container:mssql -v $OUTPUT_DIR:/bitwarden bitwarden/setup \ dotnet Setup.dll -update 1 -db 1 diff --git a/src/Api/build.sh b/src/Api/build.sh old mode 100644 new mode 100755 index 473ed87e3..dab9a68be --- a/src/Api/build.sh +++ b/src/Api/build.sh @@ -1,13 +1,14 @@ #!/usr/bin/env bash set -e -DIR="$(dirname $(readlink -f $0))" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo -e "\n# Building API" echo -e "\nBuilding app" echo -e ".NET Core version $(dotnet --version)" -dotnet publish $DIR/Api.csproj -f netcoreapp2.0 -c "Release" -o $DIR/obj/Docker/publish +dotnet publish $DIR/Api.csproj -f netcoreapp2.0 -c "Release" -o $DIR/obj/Docker/publish/Api +dotnet publish $DIR/../Jobs/Jobs.csproj -f netcoreapp2.0 -c "Release" -o $DIR/obj/Docker/publish/Jobs echo -e "\nBuilding docker image" docker --version diff --git a/src/Identity/build.sh b/src/Identity/build.sh old mode 100644 new mode 100755 index 625a63d0b..b2135f80e --- a/src/Identity/build.sh +++ b/src/Identity/build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -DIR="$(dirname $(readlink -f $0))" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo -e "\n# Building Identity" diff --git a/util/Attachments/build.sh b/util/Attachments/build.sh old mode 100644 new mode 100755 index 9f0840545..0f2ab42dc --- a/util/Attachments/build.sh +++ b/util/Attachments/build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -DIR="$(dirname $(readlink -f $0))" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo -e "\n# Building Attachments" diff --git a/util/MsSql/build.sh b/util/MsSql/build.sh old mode 100644 new mode 100755 index 9158f8ba9..07ee41325 --- a/util/MsSql/build.sh +++ b/util/MsSql/build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -DIR="$(dirname $(readlink -f $0))" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo -e "\n# Building MsSql" diff --git a/util/Nginx/build.sh b/util/Nginx/build.sh old mode 100644 new mode 100755 index b0ebfe36a..201a1e4c4 --- a/util/Nginx/build.sh +++ b/util/Nginx/build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -DIR="$(dirname $(readlink -f $0))" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo -e "\n# Building nginx" diff --git a/util/Server/build.sh b/util/Server/build.sh old mode 100644 new mode 100755 index 7c6396f7b..e16b20408 --- a/util/Server/build.sh +++ b/util/Server/build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -DIR="$(dirname $(readlink -f $0))" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo -e "\n# Building Server" diff --git a/util/Setup/build.sh b/util/Setup/build.sh old mode 100644 new mode 100755 index 75a432628..19fb279cb --- a/util/Setup/build.sh +++ b/util/Setup/build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -DIR="$(dirname $(readlink -f $0))" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo -e "\n# Building Setup"