1 files changed, 12 insertions(+), 3 deletions(-)
M run.sh
M run.sh => run.sh +12 -3
@@ 30,15 30,24 @@ script_dir="$(pwd)"
########################################################
## Adjust below as appropriate
-bundle exec ruby Photos2Atom.rb 'Foo' "http://example.com/wherever/foo/" &
-bundle exec ruby Photos2Atom.rb 'Bar' "http://example.com/somewhereelse/bar/" &
+bundle exec ruby Photos2Atom.rb 'Foo' "http://example.com/wherever/foo/" &
+bundle exec ruby Photos2Atom.rb 'Bar' "http://example.com/somewhereelse/bar/" &
wait
# put html assets in place for deployment:
find "${HOME}/Library/Caches/name.mro.iPhoto2Atom" -type d -name "200p" -exec rsync --delete -a assets "{}/.." \;
+# run atom xml through xmllint:
+find "${HOME}/Library/Caches/name.mro.iPhoto2Atom" -type f -name "photos.atom" | while read atom
+do
+ {
+ xmllint --relaxng rfc4287.rng --encode utf-8 --nonet --format --output "$atom"~ "$atom" >/dev/null \
+ && touch -r "$atom" "$atom"~ \
+ && mv "$atom"~ "$atom"
+ }
+done
-# xmllint -format -relaxng rfc4287.rng -noout "${HOME}/Library/Caches/name.mro.iPhoto2Atom/example.com/foo/album0/photos.atom"
+wait
# deploy to production
rsynv -avPz --delete "${HOME}/Library/Caches/name.mro.iPhoto2Atom/example.com/" "example.com:/var/www/.../example.com/public_html/"