From 1c0327ca885db8b7f31d5195705ccacfee569daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sat, 2 Oct 2021 12:15:37 +0200 Subject: ssg: Introduce checkout for media file and branch --- bin/ssg | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin') diff --git a/bin/ssg b/bin/ssg index 3af40a2..904245b 100755 --- a/bin/ssg +++ b/bin/ssg @@ -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 -- cgit v1.2.3