mirror of
https://github.com/axllent/mailpit.git
synced 2025-08-15 20:13:16 +02:00
Minor tweaks to installer
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This script will install the latest version of Mailpit.
|
# This script will install the latest release of Mailpit.
|
||||||
|
|
||||||
# Check dependencias is installed
|
# Check dependencies is installed
|
||||||
for cmd in curl tar; do
|
for cmd in curl tar; do
|
||||||
if ! command -v "$cmd" >/dev/null 2>&1; then
|
if ! command -v "$cmd" >/dev/null 2>&1; then
|
||||||
echo "Then $cmd command is required but not installed."
|
echo "Then $cmd command is required but not installed."
|
||||||
@@ -83,7 +83,7 @@ if [ -n "$GITHUB_API_TOKEN" ] && [ "${#GITHUB_API_TOKEN}" -gt 36 ]; then
|
|||||||
CURL_OUTPUT="$(curl -sfL -m $TIMEOUT -H "Authorization: Bearer $GITHUB_API_TOKEN" https://api.github.com/repos/${GH_REPO}/releases/latest)"
|
CURL_OUTPUT="$(curl -sfL -m $TIMEOUT -H "Authorization: Bearer $GITHUB_API_TOKEN" https://api.github.com/repos/${GH_REPO}/releases/latest)"
|
||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
else
|
else
|
||||||
CURL_OUTPUT="$(curl --sfL -m $TIMEOUT https://api.github.com/repos/${GH_REPO}/releases/latest)"
|
CURL_OUTPUT="$(curl -sfL -m $TIMEOUT https://api.github.com/repos/${GH_REPO}/releases/latest)"
|
||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -207,7 +207,6 @@ rm -rf "$TEMP_DIR"
|
|||||||
# Check the EXIT_CODE variable, and print the success or error message.
|
# Check the EXIT_CODE variable, and print the success or error message.
|
||||||
if [ $EXIT_CODE -ne 0 ]; then
|
if [ $EXIT_CODE -ne 0 ]; then
|
||||||
echo "There was an error installing Mailpit."
|
echo "There was an error installing Mailpit."
|
||||||
echo "Please try again later."
|
|
||||||
exit $EXIT_CODE
|
exit $EXIT_CODE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user