diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-10-02 12:15:37 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-10-02 12:15:37 +0200 |
commit | 1c0327ca885db8b7f31d5195705ccacfee569daa (patch) | |
tree | 6ae9a9798a3363ab09bb88308035d3a8115754b2 /bin/ssg | |
parent | 46c997264ce19211d9e0fc5928999f3c9167f178 (diff) | |
download | rgoncalves.se-1c0327ca885db8b7f31d5195705ccacfee569daa.tar.gz |
ssg: Introduce checkout for media file and branch
Diffstat (limited to 'bin/ssg')
-rwxr-xr-x | bin/ssg | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4,6 +4,7 @@ set -xe +media_branch="media" src_files="$(__list_files ${src_dir})" dirs="${media_dir} \ ${src_dir} \ @@ -19,3 +20,7 @@ done for src_file in ${src_files}; do __handle "${src_file}" done + +if git rev-parse media; then + git --work-tree="${out_dir}" checkout "${media_branch}" "${media_dir}" +fi |