Fixed mktemp in OSX and OS handlign

This commit is contained in:
Toni de la Fuente
2018-02-07 22:52:32 -05:00
parent c447e456d0
commit b92ba781ba

View File

@@ -216,6 +216,7 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
}
elif [[ "$OSTYPE" == "cygwin" ]]; then
# POSIX compatibility layer and Linux environment emulation for Windows
TEMP_REPORT_FILE=$(mktemp -t -p /tmp prowler.cred_report-XXXXXX)
how_older_from_today()
{
DATE_TO_COMPARE=$1
@@ -236,7 +237,8 @@ elif [[ "$OSTYPE" == "cygwin" ]]; then
base64 -d
}
else
echo "Unknown Operating System"
echo "Unknown Operating System! Valid \$OSTYPE: linux-gnu, linux-musl, darwin* or cygwin"
echo "Found: $OSTYPE"
EXITCODE=1
exit $EXITCODE
fi