Coder Social home page Coder Social logo

folders's Introduction

folders

Group directories and sequentially run shell operation on all group members.

Folders Demo

Installation

Below instuction assumes that you have ~/bin directory which is added to your PATH environment variable.

wget https://raw.githubusercontent.com/mchalapuk/folders/master/folders.sh -O ~/bin/folders
chmod +x ~/bin/folders

Usage

Usage: folders <command> [arguments...]

  Commands:
    list - lists folders added to the group
    add [folders...] - adds specified folders to the group
    del [folders...] - deletes specified folders from the group
    run <command-line> - runs specified command on all added folders
    usage - shows this message
    
  Options:
    --clean (-c) - displays only stdout and stderr from child processes

Creating Groups

In order to create a group, just link the script into another file.

cd ~/bin
ln -s folders all-repos

New group is used when running the script via all-repos symlink.

all-repos add ~/code/*
all-repos run git checkout master
all-repos run git pull

Above code:

  1. Adds all folders from ~/code/ directory to the group,
  2. Runs git checkout master command on all folders,
  3. Runs git pull command on all folders.

License

© 2017 Maciej Chałapuk. Released under MIT License.

folders's People

Contributors

mchalapuk avatar

Stargazers

Samuel avatar

Watchers

James Cloos avatar  avatar Samuel avatar

folders's Issues

Fix README example usage

Should be ln -s ~/bin/folders ~/bin/all-repos instead of ln -s ~/bin/program ~/bin/all-repos.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.