Skip to content

Instantly share code, notes, and snippets.

@seanr
Created January 1, 2020 22:49
Show Gist options
  • Select an option

  • Save seanr/7cf3e1e17d00eb1afcbfc5eb30ee73e3 to your computer and use it in GitHub Desktop.

Select an option

Save seanr/7cf3e1e17d00eb1afcbfc5eb30ee73e3 to your computer and use it in GitHub Desktop.

Revisions

  1. seanr created this gist Jan 1, 2020.
    21 changes: 21 additions & 0 deletions config.fish
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    function blt
    if eval [[ ! -z {$AH_SITE_ENVIRONMENT} ]]
    set PROJECT_ROOT "/var/www/html/{$AH_SITE_GROUP}.{$AH_SITE_ENVIRONMENT}"
    else if [ "`git rev-parse --show-cdup 2> /dev/null`" != "" ];
    set PROJECT_ROOT "git rev-parse --show-cdup"
    else
    set PROJECT_ROOT "."
    end

    if [ -f "$PROJECT_ROOT/vendor/bin/blt" ]
    $PROJECT_ROOT/vendor/bin/blt $argv

    # Check for local BLT.
    else if [ -f "./vendor/bin/blt" ]
    ./vendor/bin/blt $argv

    else
    echo "You must run this command from within a BLT-generated project."
    return 1
    end
    end