-
-
Notifications
You must be signed in to change notification settings - Fork 27
feat: add install script #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add install script #64
Conversation
Add a POSIX-compliant shell installation script for the tasker binary, adapted from the localias project. This script provides a convenient way to install tasker without requiring Go to be installed. Features: - Automatic platform and architecture detection - Support for Linux, macOS, and Windows - Automatic extraction of tar.gz/zip archives - Version selection (latest or specific version) - Custom installation directory - Non-interactive mode for CI/CD environments - Comprehensive error handling and user feedback The script supports the following platforms and architectures: - Linux: amd64, arm64, 386, armv6 - macOS (Darwin): amd64, arm64 - Windows: amd64 Also updated README.md with detailed installation instructions including examples for various use cases. Helpful for installing on GitHub Actions and other Linux environments.
The tar.gz and zip archives contain a parent directory with the binary inside. Updated extraction logic to: - Use --strip-components=1 for tar.gz to extract without parent dir - Move contents up one level for zip files to handle nested structure Tested full installation process and verified binary works correctly.
Instead of listing all options inline, direct users to --help flag. This reduces maintenance burden and keeps documentation in sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for PR. i ran the installer and it worked in my linux amd64. but how to verify in other flavors or OSes?
currently, since tasker is now a binary in /usr/local/bin, tasker -h with below output seems a bit lacking:
Usage of tasker:
-file string
The task file in crontab format (without user)
-out string
The fullpath to file where output from tasks are sent to
-shell string
The shell to use for running tasks (default "/usr/bin/bash")
-tz string
The timezone to use for tasks (default "Local")
-until int
The timeout for task daemon in minutes
-v Show version
-verbose
The verbose mode outputs as much as possible
basically a short intro before usage would be great if that's possible natively
| # Test if a location is writable by trying to write to it. Windows does not let | ||
| # you test writability other than by writing: https://stackoverflow.com/q/1999988 | ||
| test_writeable() { | ||
| path="${1:-}/test.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use random filename? so it won't remove the preexisting test.txt file later
| error "Error reading from prompt (please re-run with the '--yes' option)" | ||
| exit 1 | ||
| fi | ||
| if [ "$yn" != "y" ] && [ "$yn" != "yes" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about different alias/case of yes: YA, ya, ja, yea etc
so i think if first char of $yn in lowercase is y or j then it is positive
|
feat: add bash shell install script i think this commit message prefix must be |
|
closing because pr author isn't interested to put in any more effort than AI's readymade solution. |
|
Just busy with other things :) I'll come back to this later, if that's ok. |
|
that's not ok. but encouraged and welcomed. ;) |
I'm having fun with the free claude credits. Need to review + test this further, but I've used this script in other projects and it's worked great.