Skip to content

Instantly share code, notes, and snippets.

@ruslanasa
ruslanasa / sync_repo.sh
Last active June 2, 2017 11:44
Script for folder sync of two set of nodejs git projects
#!/bin/bash
# Reusable traversing of project dirs assuming 1 level project hierarchy
function forproject() {
for dir in `find . -mindepth 1 -maxdepth 1 -type d`
do
(cd "$dir" && echo "Processing project: $PWD" && "$@")
done
}