Skip to content

Instantly share code, notes, and snippets.

@luceos
Created June 7, 2018 14:51
Show Gist options
  • Select an option

  • Save luceos/ddc5dc2b43edec7637300db3b29041f0 to your computer and use it in GitHub Desktop.

Select an option

Save luceos/ddc5dc2b43edec7637300db3b29041f0 to your computer and use it in GitHub Desktop.

Revisions

  1. luceos created this gist Jun 7, 2018.
    41 changes: 41 additions & 0 deletions recompile.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    #!/usr/bin/env bash

    base=$PWD

    for PACKAGE in `find vendor -mindepth 2 -maxdepth 2 -type d`
    do
    cd $PACKAGE

    PACKAGE_PATH=$PWD

    if [ -f "bootstrap.php" ]; then
    echo "> --- Found extension $PACKAGE";
    if [ -d "js" ]; then
    if [ -f "js/bower.json" ]; then
    cd js/
    bower install
    cd $PACKAGE_PATH
    fi
    for JS in `find js -mindepth 1 -maxdepth 1 -type d`
    do
    cd $JS
    if [ -f "bower.json" ]; then
    bower install
    fi
    if [ -f "package.json" ]; then
    npm install
    fi
    if [ -f "Gulpfile.js" ]; then
    node_modules/gulp/bin/gulp.js
    fi

    if [ -d "node_modules" ]; then
    rm -rf node_modules
    fi

    cd $PACKAGE_PATH
    done
    fi
    fi
    cd $base
    done