Skip to content

Instantly share code, notes, and snippets.

@grikomsn
Last active February 20, 2023 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save grikomsn/f406603af53d1fb819413c60b8cb40ee to your computer and use it in GitHub Desktop.
Save grikomsn/f406603af53d1fb819413c60b8cb40ee to your computer and use it in GitHub Desktop.
photo-stream upstream syncer
#!/usr/bin/env bash
build_with_cache() {
if [[ -d "$XDG_CACHE_HOME"/photos ]]; then
echo "Copying cached photos directory..."
rsync -a "$XDG_CACHE_HOME"/photos/ photos
else
echo "No cached photos directory to be found"
fi
echo "Building..."
bundle exec jekyll build --incremental
echo "Build complete, caching photos directory..."
rsync -a photos/ "$XDG_CACHE_HOME"/photos
}
if [[ "$RENDER" ]]; then
build_with_cache
else
bundle exec jekyll build --incremental
fi
#!/usr/bin/env bash
npx degit waschinski/photo-stream --force
git clean -f photos/** LICENSE
git restore photos/** .env .gitattributes README.md social-preview.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment