lima-xbar-plugin icon indicating copy to clipboard operation
lima-xbar-plugin copied to clipboard

refactor (Makefile): error handling and help target

Open pythoninthegrass opened this issue 9 months ago • 1 comments

When running the Makefile as-is it fails on the install target if the directory doesn't exist and runs all targets. This PR adds error handling and a new help target/goal that prints available options (ignores short options however).

Description

  • chmod +x
  • shebang
  • default goal is now the help target
  • mark targets as phony (avoid filename collisions)
  • error handling for install target
  • raise issue in todo for deprecated shellcheck call
  • help comments
  • help target (make / make help)
  • exclude requirements.txt (generated by Makefile)

Screenshot 2024-05-15 at 9 07 03 PM

Type of changes

Checklist

  • [x] All new and existing tests pass.
  • [x] Any added/updated scripts added use #!/usr/bin/env interpreter instead of potentially platform-specific direct paths (#!/bin/sh and #!/bin/bash are allowed exceptions)
  • [x] Added/updated scripts are marked executable
  • [x] Scripts do not have a language file extension unless they are meant to be sourced and not run standalone. No end-user should have to know if a script was written in bash, python, ruby or whatever. Not including file extensions makes it easier to rewrite the script in another language later without having to change every reference to the previous version.
  • [x] I have confirmed that the link(s) in my PR are valid.

License Acceptance

  • [x] This repository is Apache version 2.0 licensed (some scripts may have alternate licensing inline in their code) and by making this PR, I am contributing my changes to the repository under the terms of the Apache 2 license.

pythoninthegrass avatar May 16 '24 02:05 pythoninthegrass

re: #!/usr/bin/env interpreter haven't tested extensively, but make exists in /usr/bin/make on macOS and Ubuntu 20.04. Probably the same in Debian and Red Hat family OSes.

pythoninthegrass avatar May 16 '24 02:05 pythoninthegrass