Skip to content

Instantly share code, notes, and snippets.

@timonweb
Last active June 18, 2020 12:47
Show Gist options
  • Select an option

  • Save timonweb/b70467935c6f666cacab67ea4bdea61b to your computer and use it in GitHub Desktop.

Select an option

Save timonweb/b70467935c6f666cacab67ea4bdea61b to your computer and use it in GitHub Desktop.

Revisions

  1. timonweb revised this gist Jun 18, 2020. No changes.
  2. timonweb revised this gist Jun 18, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tasks.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/sh
    #
    # One line installer:
    # sudo curl https://gist.github.com/timonweb/b70467935c6f666cacab67ea4bdea61b/raw/d45959ffd06da9b2e42472976d5f12c78a0fff7a/tasks.sh -o /usr/local/bin/tasks && sudo chmod +x /usr/local/bin/tasks
    # sudo curl https://gist.github.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
  3. timonweb revised this gist Jun 18, 2020. 1 changed file with 8 additions and 7 deletions.
    15 changes: 8 additions & 7 deletions tasks.sh
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,20 @@
    #!/bin/sh
    #
    # One line installer: sudo curl https://gist.github.com/timonweb/b70467935c6f666cacab67ea4bdea61b/raw/d45959ffd06da9b2e42472976d5f12c78a0fff7a/tasks.sh -o /usr/local/bin/tasks && sudo chmod +x /usr/local/bin/tasks
    # One line installer:
    # sudo curl https://gist.github.com/timonweb/b70467935c6f666cacab67ea4bdea61b/raw/d45959ffd06da9b2e42472976d5f12c78a0fff7a/tasks.sh -o /usr/local/bin/tasks && sudo chmod +x /usr/local/bin/tasks

    tasks_path=0
    tasksfile_path=0
    while [[ "`pwd`" != '/' ]]; do
    tasks_path=$(find $(pwd) -type f -name "tasks" -print | head -n 1)
    if [[ -n $tasks_path ]]; then
    tasksfile_path=$(find $(pwd) -type f -name "Tasksfile" -print | head -n 1)
    if [[ -n $tasksfile_path ]]; then
    echo "Running 'tasks $@' command:"
    sh $tasks_path $@
    sh $tasksfile_path $@
    break
    else
    cd ..
    fi
    done

    if [[ tasks_path == 0 ]]; then
    echo 'Cant find tasks'
    if [[ tasksfile_path == 0 ]]; then
    echo 'Cant find Tasksfile'
    fi
  4. timonweb revised this gist Jun 18, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tasks.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/bin/sh
    #
    # One line installer:
    # One line installer: sudo curl https://gist.github.com/timonweb/b70467935c6f666cacab67ea4bdea61b/raw/d45959ffd06da9b2e42472976d5f12c78a0fff7a/tasks.sh -o /usr/local/bin/tasks && sudo chmod +x /usr/local/bin/tasks

    tasks_path=0
    while [[ "`pwd`" != '/' ]]; do
  5. timonweb renamed this gist Jun 18, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. timonweb created this gist Jun 18, 2020.
    19 changes: 19 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    #!/bin/sh
    #
    # One line installer:

    tasks_path=0
    while [[ "`pwd`" != '/' ]]; do
    tasks_path=$(find $(pwd) -type f -name "tasks" -print | head -n 1)
    if [[ -n $tasks_path ]]; then
    echo "Running 'tasks $@' command:"
    sh $tasks_path $@
    break
    else
    cd ..
    fi
    done

    if [[ tasks_path == 0 ]]; then
    echo 'Cant find tasks'
    fi