From 0dce70f1d6b5e974a7f453635cad138074c86999 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mikl=C3=B3s=20T=C3=B3th?= <tothmiklostibor@gmail.com>
Date: Mon, 10 May 2021 03:05:04 +0200
Subject: [PATCH] i wanna sleep

---
 build.ps1     |  4 ++++
 docs/magic.sh | 15 +++++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/build.ps1 b/build.ps1
index e5cdcf6d..29b79044 100755
--- a/build.ps1
+++ b/build.ps1
@@ -46,5 +46,9 @@ Get-ChildItem -Recurse "projlab" |
     }
 
 Remove-Item -path "$jarfile" 2>$null
+Remove-Item -path META-INF -recurse
+
+mv META-INF.bak META-INF
+
 jar cfm "$jarfile" META-INF/MANIFEST.MF projlab/*.class projlab/commands/*.class
 echo "Successfully built $jarfile"
diff --git a/docs/magic.sh b/docs/magic.sh
index 3fe50859..697e6538 100755
--- a/docs/magic.sh
+++ b/docs/magic.sh
@@ -9,10 +9,15 @@ if [ "$0" != "/tmp/merge/merge.sh" ]; then
   exec /tmp/merge/merge.sh
 fi
 
+if [ -d lines ]; then
+  cp -r docs/lines /tmp/
+fi
+
 hash="$(git rev-parse HEAD)"
 
-for week in 2 3 4 5 6 7 9 10 11 13 14; do
+for week in 7 11 2 3 4 5 6 9 10 13 14; do
   echo "week $week incoming..."
+  git reset --hard
   git clean -fd
   git checkout "w${week}"
 
@@ -20,6 +25,10 @@ for week in 2 3 4 5 6 7 9 10 11 13 14; do
     bash -c "cd ..; /tmp/merge/build.sh"
   fi
 
+  if [ "$week" = "14" ]; then
+    cp -r /tmp/lines docs/
+  fi
+
   plab classdiag ../src
   plantuml -tlatex:nopreamble /tmp/projlabclasses.txt
   sed -i 's/#/\\#/g' /tmp/projlabclasses.latex
@@ -32,7 +41,9 @@ for week in 2 3 4 5 6 7 9 10 11 13 14; do
   fi
   plab flatten weeks/${weektmp}.tex includes/misc-functions.tex /tmp/merge/${weektmp}.tex
 
-  git reset --hard "w${week}"
+  cp /tmp/projlabclasses.latex "/tmp/projlabclasses-${weektmp}.latex"
+  sed "s/\\/tmp\\/projlabclasses/\\/tmp\\/projlabclasses-${weektmp}/g" -i /tmp/merge/${weektmp}.tex
+
 done
 
 git checkout "$hash"
-- 
GitLab