Skip to content

Instantly share code, notes, and snippets.

@timonweb
Last active June 18, 2020 12:47
Show Gist options
  • Save timonweb/b70467935c6f666cacab67ea4bdea61b to your computer and use it in GitHub Desktop.
Save timonweb/b70467935c6f666cacab67ea4bdea61b to your computer and use it in GitHub Desktop.
Tasks launcher
#!/bin/sh
#
# One line installer:
# sudo curl https://gist.githubusercontent.com/timonweb/b70467935c6f666cacab67ea4bdea61b/raw/d6e32a5b5a8ddca2d78e2fb55af8a0b6320b9835/tasks.sh -o /usr/local/bin/tasks && sudo chmod +x /usr/local/bin/tasks
tasksfile_path=0
while [[ "`pwd`" != '/' ]]; do
tasksfile_path=$(find $(pwd) -type f -name "Tasksfile" -print | head -n 1)
if [[ -n $tasksfile_path ]]; then
echo "Running 'tasks $@' command:"
sh $tasksfile_path $@
break
else
cd ..
fi
done
if [[ tasksfile_path == 0 ]]; then
echo 'Cant find Tasksfile'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment