diff --git a/.gitignore b/.gitignore index c742e6a..571d6e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .DS_Store - -*.iml \ No newline at end of file +*.iml +target diff --git a/create-release.sh b/create-release.sh new file mode 100755 index 0000000..ff5eaf5 --- /dev/null +++ b/create-release.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -e + +OUTPUT_DIR=target +TAR_FILE=${OUTPUT_DIR}/dev-nginx.tar.gz +REPORT_FILE=${OUTPUT_DIR}/report.txt + +rm -rf ${OUTPUT_DIR} +mkdir -p ${OUTPUT_DIR} + +tar -zcf ${TAR_FILE} bin script +SHA256=$(shasum -a 256 ${TAR_FILE}) + +echo -e "$(date)\n${SHA256}" >> ${REPORT_FILE} + +cat ${REPORT_FILE} diff --git a/script/add-to-hosts-file b/script/add-to-hosts-file index 207e96b..ff21482 100755 --- a/script/add-to-hosts-file +++ b/script/add-to-hosts-file @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e + # colours YELLOW='\033[1;33m' NC='\033[0m' # no colour - reset console colour diff --git a/script/link-config b/script/link-config index a21188e..e328a86 100755 --- a/script/link-config +++ b/script/link-config @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e + # colours YELLOW='\033[1;33m' NC='\033[0m' # no colour - reset console colour diff --git a/script/locate-nginx b/script/locate-nginx index c7426a5..a6d81b1 100755 --- a/script/locate-nginx +++ b/script/locate-nginx @@ -1,3 +1,5 @@ #!/usr/bin/env bash +set -e + nginx -V 2>&1 | grep "configure arguments:" | sed 's/[^*]*conf-path=\([^ ]*\)\/nginx\.conf.*/\1/g' diff --git a/script/restart-nginx b/script/restart-nginx index b48aa82..f7c709d 100755 --- a/script/restart-nginx +++ b/script/restart-nginx @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e + # colours YELLOW='\033[1;33m' NC='\033[0m' # no colour - reset console colour