Skip to content

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

License

Notifications You must be signed in to change notification settings

mchalapuk/folders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages