aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-10-02 12:29:38 +0200
committerRomain Gonçalves <me@rgoncalves.se>2021-10-02 12:29:38 +0200
commite83280879b56f8b35f4046f03f72ec3203aad94b (patch)
tree869c60e5d96d79908701fef9dd9d34db9f826c5f
parent1c0327ca885db8b7f31d5195705ccacfee569daa (diff)
downloadrgoncalves.se-e83280879b56f8b35f4046f03f72ec3203aad94b.tar.gz
ssg: Copy from branch without staging file
-rwxr-xr-xbin/ssg4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/ssg b/bin/ssg
index 904245b..f8da7c6 100755
--- a/bin/ssg
+++ b/bin/ssg
@@ -21,6 +21,8 @@ for src_file in ${src_files}; do
__handle "${src_file}"
done
+# Copy images
if git rev-parse media; then
- git --work-tree="${out_dir}" checkout "${media_branch}" "${media_dir}"
+ git restore --source=media --worktree "img"
+ mv "img" "out"
fi
remember that computers suck.