Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@irene That's `tag=dev make build`, still the same amount of typing but less readable.
Also, necessity to quote multi-words sucks. Ideally I'd like to be able to `make composer require somestuff` instead of `make composer cmd='require somestuff'`. -
@irene Make treats subsequent arguments as recipe names and runs all of them (which make sense for its original use case), so forking is not an option. Someone in our company already built a custom tool just for this job, but having to use a non-standard tool for such a trivial thing is a shame.
@electrineer See the composer example. Some commands don't have repeatable arguments and I run them just once. -
What about Bash?
Let's say you have a directory called ~/Tasks. You add a build.sh script there, and then you write your entry point script that just does something like this:
#!/usr/bin/env bash
[[ -z "$*" ]] && exit 1
task_dir="$HOME/Tasks"
task="$1"
shift
task_path="$task_dir/$task.sh"
if [[ -f "$task_path" ]]; then
source "$task_path" "$@"
else
echo "Task $task doesn't exist." >&2
exit 1
fi -
@ethernetzero Quite elegant, but command completion won't work. I'm looking for something completely standard. I'm aware of npm scripts, but this is mostly for PHP and using node for executing oneliners is an overkill anyway.
-
@gronostaj Command completion can work if you add a completion function to your ~/.bashrc that simply lists the files in your ~/Tasks directory.
Here's a nice tutorial: http://fahdshariff.blogspot.com/201...
I see that you're looking for some ready-made package, but if nothing turns out you know you can roll your own. -
Hazarth94725yUse cmake with ccmake! That way you can configure everything in a terminal interface
-
@ethernetzero Yeah, custom completions are pretty cool, but that's not what I want. It must be readily available on Linux/OS X and require no extra configuration.
-
@gronostaj It's OK. 🙂 Let it serve as a DIY way for anyone that might find it useful, then.
Related Rants
-
gururaju53*Now that's what I call a Hacker* MOTHER OF ALL AUTOMATIONS This seems a long post. but you will definitely ...
-
linuxxx65This guy at my last internship. A windows fanboy to the fucking max! He was saying how he'd never use anythi...
-
creedasaurus60Another dev on my team just got a new machine. Before he came in today I made two separate USB installers and ...
Q: I'm using make as a simple task runner. `make build` instead of a longer build command etc. It sucks that I can't simply pass some params like `make build dev`, instead I have to pass them as variables: `make build tag=dev`.
Can you recommend a standard, cross-platform (Linux, OS X) tool for this?
question
os x
linux
makefile
make