We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb7077d commit c8ec860Copy full SHA for c8ec860
xseed.sh
@@ -8,16 +8,22 @@
8
9
# Load environment variables from .env file if it exists
10
# in the same directory as this bash script
11
-VERSION='2.1.0'
+VERSION='2.1.1'
12
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
13
ENV_PATH="$SCRIPT_DIR/.env"
14
15
# Function to log messages
16
log_message() {
17
local log_type="$1"
18
local message="$2"
19
- echo "$(date '+%Y-%m-%d %H:%M:%S') [$log_type] $message" | tee -a "$LOG_FILE"
+ local log_line="$(date '+%Y-%m-%d %H:%M:%S') [$log_type] $message"
20
+ if [ -f "$LOG_FILE" ]; then
21
+ echo "$log_line" | tee -a "$LOG_FILE"
22
+ else
23
+ echo "$log_line"
24
+ fi
25
}
26
+
27
log_message "INFO" "xseed.sh script started $VERSION"
28
EVAR=false
29
if [ -f "$ENV_PATH" ]; then
0 commit comments