Skip to content

Conversation

@iloveitaly
Copy link

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.

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.
@iloveitaly iloveitaly requested a review from adhocore as a code owner November 6, 2025 19:46
Copy link
Owner

@adhocore adhocore left a 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"
Copy link
Owner

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
Copy link
Owner

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

@adhocore
Copy link
Owner

adhocore commented Nov 8, 2025

feat: add bash shell install script

i think this commit message prefix must be build: ... instead of feat: ...

@adhocore
Copy link
Owner

closing because pr author isn't interested to put in any more effort than AI's readymade solution.

@adhocore adhocore closed this Nov 15, 2025
@iloveitaly
Copy link
Author

iloveitaly commented Nov 18, 2025

Just busy with other things :) I'll come back to this later, if that's ok.

@adhocore
Copy link
Owner

that's not ok. but encouraged and welcomed. ;)

@adhocore adhocore reopened this Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants