Last active
June 18, 2020 12:47
-
-
Save timonweb/b70467935c6f666cacab67ea4bdea61b to your computer and use it in GitHub Desktop.
Tasks launcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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