.PHONY: default update update-inter update-photoswipe format default: update: update-inter update-photoswipe format update-inter: @tmp_zip=$$(mktemp) && \ tmp_dir=$$(mktemp -d) && \ curl -s https://api.github.com/repos/rsms/inter/releases/latest \ | jq -r '.assets[] | select(.name | test("\\.zip$$")) | .browser_download_url' \ | xargs curl -Ls -o $$tmp_zip && \ unzip -q -o $$tmp_zip "web/*" -d $$tmp_dir && \ rm -rf static/font/inter && \ mkdir -p static/font/inter && \ cp -r $$tmp_dir/web/{InterVariable*.woff2,Inter-*.woff2} static/font/inter && \ rm -rf $$tmp_zip $$tmp_dir update-photoswipe: @tmp_zip=$$(mktemp) && \ tmp_dir=$$(mktemp -d) && \ curl -s https://api.github.com/repos/dimsemenov/photoswipe/releases/latest \ | jq -r '.zipball_url' \ | xargs curl -Ls -o $$tmp_zip && \ unzip -q -o $$tmp_zip -d $$tmp_dir && \ rm -rf assets/js/photoswipe assets/css/photoswipe && \ mkdir -p assets/js/photoswipe assets/css/photoswipe && \ cp $$tmp_dir/*PhotoSwipe*/dist/photoswipe-lightbox.esm.js assets/js/photoswipe && \ cp $$tmp_dir/*PhotoSwipe*/dist/photoswipe.esm.js assets/js/photoswipe && \ cp $$tmp_dir/*PhotoSwipe*/dist/photoswipe.css assets/css/photoswipe && \ rm -rf $$tmp_zip $$tmp_dir format: nix fmt