Skip to content

Commit

Permalink
fix: add codes per lecs
Browse files Browse the repository at this point in the history
  • Loading branch information
E1PsyCongroo committed Oct 14, 2024
1 parent 3212dce commit 579bae0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ cp -r "${SOURCE[@]}" "$SITE_DIR"

JEKLLY_TOOL_DIR="$WORK_DIR/Tools/ghpages-mini-fileserver"
RESOURCE="$JEKLLY_TOOL_DIR/resources"
mkdir -p "$RESOURCE"
find "$WORK_DIR/Lectures" -type d -name "Codes" -exec cp -r "{}" "$RESOURCE" \;
find "$WORK_DIR/Lectures" -name "Codes" -type d -print | sed "s|$WORK_DIR/Lectures/||" | while read -r dir; do
mkdir -p "$RESOURCE/$(dirname "$dir")"
cp -r "$WORK_DIR/Lectures/$dir" "$RESOURCE/$dir"
done
bash "$JEKLLY_TOOL_DIR/prenodes.sh"
cd "$JEKLLY_TOOL_DIR" && bundle exec jekyll build --baseurl "$1"
cp -r "$JEKLLY_TOOL_DIR/_site" "$SITE_DIR"

0 comments on commit 579bae0

Please sign in to comment.