Last active
December 27, 2018 18:31
-
-
Save wemakefuture/692f3e1bf08a7b2b33a73a8684600ece to your computer and use it in GitHub Desktop.
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 | |
echo "checking for folder" | |
if [ -d root/UpdateInstaPy/ ] | |
then | |
now=$(date +\%m_\%d_\%Y) | |
mkdir /root/UpdateInstaPy/$now | |
echo "created new Folder with name: $now" | |
cd /root/UpdateInstaPy/$now && git clone https://github.com/timgrossmann/InstaPy.git | |
latest_version=$(wget https://chromedriver.storage.googleapis.com/LATEST_RELEASE -O -) | |
wget https://chromedriver.storage.googleapis.com/${latest_version}/chromedriver_linux64.zip | |
unzip chromedriver_linux64 | |
mv chromedriver /root/UpdateInstaPy/$now/InstaPy/assets/chromedriver | |
chmod +x /root/UpdateInstaPy/$now/InstaPy/assets/chromedriver | |
chmod 755 /root/UpdateInstaPy/$now/InstaPy/assets/chromedriver | |
rm chromedriver_linux64.zip | |
cd | |
cd /root/UpdateInstaPy/$now/InstaPy/ && pip install . | |
else | |
now=$(date +\%m_\%d_\%Y) | |
mkdir /root/UpdateInstaPy | |
mkdir /root/UpdateInstaPy/$now | |
echo "created new globalfolder UpdateInstaPy and subfolder with name: $now" | |
cd /root/UpdateInstaPy/$now && git clone https://github.com/timgrossmann/InstaPy.git | |
latest_version=$(wget https://chromedriver.storage.googleapis.com/LATEST_RELEASE -O -) | |
wget https://chromedriver.storage.googleapis.com/${latest_version}/chromedriver_linux64.zip | |
unzip chromedriver_linux64 | |
mv chromedriver /root/UpdateInstaPy/$now/InstaPy/assets/chromedriver | |
chmod +x /root/UpdateInstaPy/$now/InstaPy/assets/chromedriver | |
chmod 755 /root/UpdateInstaPy/$now/InstaPy/assets/chromedriver | |
rm chromedriver_linux64.zip | |
cd | |
cd /root/UpdateInstaPy/$now/InstaPy/ && pip install . | |
fi | |
cd | |
cp -v /root/UpdateInstaPy/*.py /root/UpdateInstaPy/$(date +\%m_\%d_\%Y)/InstaPy | |
cd | |
rm -rf /root/UpdateInstaPy/$(date -d 'yesterday' +\%m_\%d_\%Y) | |
echo "all done have fun" |
Author
wemakefuture
commented
Dec 26, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment