From 3a829d6da56176cefb8abdb41f7620a8efed74db Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Thu, 31 Dec 2020 02:28:55 +0000 Subject: [PATCH] Add script for automatically updating main blog view. --- blog/change_blog_nix.sh | 1 + blog/update_blog.sh | 1 + 2 files changed, 2 insertions(+) create mode 100755 blog/change_blog_nix.sh create mode 100755 blog/update_blog.sh diff --git a/blog/change_blog_nix.sh b/blog/change_blog_nix.sh new file mode 100755 index 0000000..53280c2 --- /dev/null +++ b/blog/change_blog_nix.sh @@ -0,0 +1 @@ +sed -i "s/rev = \".*\"/rev = \"$1\"/" "s/sha256 = \".*\"/sha256 = \"$2\"/" default.nix diff --git a/blog/update_blog.sh b/blog/update_blog.sh new file mode 100755 index 0000000..a7b4014 --- /dev/null +++ b/blog/update_blog.sh @@ -0,0 +1 @@ +nix-prefetch-git --rev refs/heads/master https://dev.danilafe.com/Web-Projects/blog-static.git --quiet | jq '.rev,.sha256' | xargs ./change_blog_nix.sh