Created
February 25, 2021 23:28
-
-
Save kuang-da/a6e08e0640d1b255af621e2f246e6270 to your computer and use it in GitHub Desktop.
[Depolyment]The scripts for deployment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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