Skip to content

Instantly share code, notes, and snippets.

@kuang-da
Created February 25, 2021 23:28
Show Gist options
  • Save kuang-da/a6e08e0640d1b255af621e2f246e6270 to your computer and use it in GitHub Desktop.
Save kuang-da/a6e08e0640d1b255af621e2f246e6270 to your computer and use it in GitHub Desktop.
[Depolyment]The scripts for deployment
#!/bin/bash
# Depolyment of lecture notes
# Copy all the notes into a single directory before pushing to GitHub
DIRECTORY=.
TARGET_DIR=all-notes
FILE_NAMES=("2-hypothesis-testing" \
"3-binomial-distribution" \
"4-sign-test-wilcoxon-signed-rank-test" \
"5-wilconxon-rank-sum-test-rs-test" \
"6-ansari-bradley-test-kruskal-wallis-test")
mkdir "$DIRECTORY/$TARGET_DIR"
for the_file in "$DIRECTORY"/l*/main.pdf; do
echo "$the_file"
idx=$(echo "$the_file" | tr -cd '0-9')
idx=$(("$idx" - 2))
echo "${FILE_NAMES[$NUMBER]}"
cp "$the_file" "$DIRECTORY/$TARGET_DIR/${FILE_NAMES[$idx]}.pdf"
done
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment