Last active
February 20, 2023 13:26
-
-
Save grikomsn/f406603af53d1fb819413c60b8cb40ee to your computer and use it in GitHub Desktop.
photo-stream upstream syncer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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