Created
May 22, 2015 12:52
-
-
Save earnubs/53ae926705c57a11d117 to your computer and use it in GitHub Desktop.
run a bunch of fswatch tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -u | |
folders=( "www/public/images" "www/templates" "www/public/js" "www/public/css") | |
echo "Sending watched files to ${UBUNTU_CORE_ADDR:?"Need to set UBUNTU_CORE_ADDR"}" | |
for i in "${folders[@]}" | |
do | |
echo $i | |
fswatch -0 $i | xargs -0 -n 1 -I {} scp {} $UBUNTU_CORE_ADDR:/apps/webdm/current/$i & | |
done | |
wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment