3 # iPhoto2Atom, extract images from iPhoto™ libraries
4 # Copyright (C) 2015-2016 Marcus Rohrmoser, http://purl.mro.name/iPhoto2Atom
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # Download and install http://lokeshdhakar.com/projects/lightbox2/
23 src
="https://github.com/lokesh/lightbox2/archive/v2.8.2.zip"
24 dst
="assets/lightbox2"
28 zip=".tmp/lightbox2.zip"
30 curl
--location --create-dirs --remote-time --time-cond "${zip}" --output "${zip}" --url "${src}"
33 for d
in css images js
35 mkdir
-p "${dst}/${d}"
36 unzip -jo "${zip}" */dist/"${d}"/*.* -d "${dst}/${d}"
38 echo "-------------------"
39 find "${dst}" -name .DS_Store
-exec rm "{}" \
;
40 find "${dst}" -type f \
( -name *.js
-or -name *.css \
) -not -name *.min.
* -exec rm "{}" \
;
41 find "${dst}" -type f
-name *.map
-or -name lightbox.min.js
-exec rm "{}" \
;
43 rm -rf "$(dirname "${zip}")"