OLD | NEW |
(Empty) | |
| 1 #!/bin/sh |
| 2 |
| 3 # This script copies the build outputs produced by `pub build` to |
| 4 # the deployed directory. |
| 5 |
| 6 if [ ! -d "build" ]; then |
| 7 echo "Please run pub build first" |
| 8 exit |
| 9 fi |
| 10 |
| 11 if [ ! -d "deployed" ]; then |
| 12 echo "Run this script from the observatory directory" |
| 13 exit |
| 14 fi |
| 15 |
| 16 EXCLUDE="--exclude bootstrap_css" |
| 17 EXCLUDE="$EXCLUDE --exclude *.map" |
| 18 EXCLUDE="$EXCLUDE --exclude *.concat.js" |
| 19 EXCLUDE="$EXCLUDE --exclude *.scriptUrls" |
| 20 EXCLUDE="$EXCLUDE --exclude *.precompiled.js" |
| 21 EXCLUDE="$EXCLUDE --exclude main.*" |
| 22 EXCLUDE="$EXCLUDE --exclude unittest" |
| 23 EXCLUDE="$EXCLUDE --exclude *_buildLogs*" |
| 24 |
| 25 # For some reason... |
| 26 # |
| 27 # EXCLUDE="$EXCLUDE --exclude *~" |
| 28 # |
| 29 # ..doesn't work to exclude emacs auto-save files. I'm sure it is |
| 30 # something silly, but, in the meantime, solve the problem with a |
| 31 # hammer. |
| 32 find build -type f | grep ~$ | xargs rm |
| 33 |
| 34 rsync -av --progress build/web/ deployed/web/ $EXCLUDE |
OLD | NEW |