#!/bin/bash

# Watches for changes in the files and passes to docker
# ignores the folders: node_modules, .git

cwd=$(pwd)

fswatch -0 -e node_modules -e .git -e env . | while read -d "" absPath 
  do
    shortPath=""
    shortPath=${absPath/$cwd/$shortPath}
    echo "${shortPath}"
    docker cp $absPath helix:project${shortPath}
  done


