tespent / task-notify

Capture final status and output of a possibly-long-running task, and send info to Feishu
Apache License 2.0
9 stars 2 forks source link

[Feature Request]: Add Support for macOS due to Differences in script Command #1

Closed SKDDJ closed 5 months ago

SKDDJ commented 6 months ago

Hi there @tespent,

First of all, thanks a lot for your hard work on this project! I've been finding it incredibly useful. However, I've run into an issue related to the script command's compatibility between macOS and Linux.

As you might be aware, the script command behaves differently on macOS compared to Linux, which has led to some compatibility issues when running the script on a macOS system. I believe adding support for macOS would greatly enhance the usability of this script for users like myself who work across different operating systems.

I'd like to suggest a feature enhancement where the script initially checks the operating system and executes commands accordingly. For instance:

if [[ "$(uname)" == "Darwin" ]]; then
# macOS specific commands
else
# Linux specific commands
fi

This conditional check could help in executing the right set of commands based on the operating system, ensuring compatibility and smooth operation on both macOS and Linux platforms.

Thank you for considering this enhancement. Looking forward to seeing this implemented in future updates

SKDDJ commented 6 months ago

Additionally, it might be beneficial to include a one-click installation script in your README for easy setup. Here's a suggestion for such a script:

wget https://github.com/tespent/task-notify/raw/main/task-notify.sh && sed -i 's|https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxxxxxxxxxxxxxxx|<YOUR_NEW_WEBHOOK_URL>|' task-notify.sh && chmod +x task-notify.sh && ./task-notify.sh echo helloworld

This script simplifies the initial setup and configuration, making it more accessible for new users.

tespent commented 5 months ago

Hi, thanks for your suggestions. I'll try add support for macOS in the weekend.

Also, I like your idea of making installation progress simpler. I would like to try adding an installation script later.