Skip to content

Instantly share code, notes, and snippets.

@nodew
Created May 16, 2017 05:28
Show Gist options
  • Save nodew/4ebfa5805dad117890c2b6bd00ca1ad7 to your computer and use it in GitHub Desktop.
Save nodew/4ebfa5805dad117890c2b6bd00ca1ad7 to your computer and use it in GitHub Desktop.
#!/bin/bash
files=`find ./src -type f -regex "./.*.[^coffee]"`
for file in $files
do
path=`dirname $file`
newpath=`echo ${path//src/build}`
filename=`basename $file`
if [ ! -d $newpath ]; then
mkdir -p $newpath
fi
cp $file $newpath
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment