-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from NewWays-TechForImpactKAIST/feat-cron-scripts
CRON잡 생성을 위한 bash 스크립트 작성
- Loading branch information
Showing
3 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
echo "Installing python virtual environment..." | ||
|
||
cd ~ && virtualenv newways --python=3.10 | ||
source ~/newways/bin/activate | ||
pip install -r ~/API-scrap-and-analysis/requirements.txt | ||
|
||
echo "Python virtual environment has been installed successfully in ~/newways." | ||
echo "Installing chromedriver..." | ||
|
||
CHROMEDRIVER_URL="https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip" | ||
TEMP_DIR="/tmp/chromedriver_download" | ||
|
||
mkdir -p "$TEMP_DIR" | ||
cd "$TEMP_DIR" | ||
|
||
curl -O "$CHROMEDRIVER_URL" | ||
unzip chromedriver_linux64.zip | ||
sudo mv chromedriver /usr/local/bin/ | ||
|
||
cd - | ||
rm -rf "$TEMP_DIR" | ||
|
||
echo "Chromedriver has been installed successfully." |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# 아래 설정에 맞게 세팅되어 있는지 확인하고 실행!! | ||
cd ~/API-scrap-and-analysis | ||
source ~/newways/bin/activate | ||
|
||
python -m scrap.utils.runner -w local -m | ||
python -m scrap.utils.runner -w metro -m | ||
|
||
deactivate |