From 29d0344081547692d5e7351f6255ea4db3ce0428 Mon Sep 17 00:00:00 2001
From: Simon Petit <nomisp96@hotmail.fr>
Date: Thu, 24 Oct 2024 14:15:39 +0200
Subject: [PATCH] erratum

---
 Makefile | 8 ++++++++
 bob      | 8 ++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index fcfeb4e..9be1b7d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,15 @@
 install:
 	@echo "Installing bob"
 	cp bob /usr/local/bin
+	cp bob2 /usr/local/bin
+	cp -r lib /usr/local/lib/bob
 
 uninstall:
 	@echo "Uninstalling bob"
 	rm /usr/local/bin/bob
+	rm /usr/local/bin/bob2
+	rm -r /usr/local/lib/bob
+
+
+test:
+	/bin/sh ./test/test.sh
\ No newline at end of file
diff --git a/bob b/bob
index 6638385..5630587 100755
--- a/bob
+++ b/bob
@@ -89,7 +89,7 @@ _get_last_modif_date()
 
 publish()
 {
-    delete_posts
+    # delete_posts
 
     # Collect all configuration parameters so that the regex are only evaluted
     # once per publication. Done to improve the speed of the publication
@@ -119,7 +119,7 @@ publish()
             # Append the names to the array
             posts_names+=(${BASH_REMATCH[1]})
         fi
-        _create_posts "./bases/${list[i]}" "$blog_name" "$lang" "$dark"
+        _create_posts "./draft/${list[i]}" "$blog_name" "$lang" "$dark"
     done
 
     # function to update the index.html
@@ -269,7 +269,7 @@ init()
     echo "lang:$lang" >> .blog.conf
     echo "Activate dark mode : (y/N)"
     read dark
-    if [ -z $lang ]; then
+    if [ -z $dark ]; then
         dark=n
     fi
     echo "dark:$dark" >> .blog.conf
@@ -438,7 +438,7 @@ _index()
     dark=$3
     css="./css/indexstyle.css"
     
-    if [ $3 -eq "y" ]; then
+    if [[ $dark -eq "y" ]]; then
         css="./css/indexstyle.dark.css"
     fi