Skip to content

Instantly share code, notes, and snippets.

@ajankuv
Created October 31, 2018 15:06
Show Gist options
  • Save ajankuv/d05bdfb8d543d6b370ca4b438612191b to your computer and use it in GitHub Desktop.
Save ajankuv/d05bdfb8d543d6b370ca4b438612191b to your computer and use it in GitHub Desktop.
instapy quick setup in venv
#!/bin/bash
# quick instapy installer
pip install git+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;
mkdir -p local/lib/python2.7/site-packages/assets;
mv chromedriver local/lib/python2.7/site-packages/assets;
chmod +x local/lib/python2.7/site-packages/assets/chromedriver;
chmod 755 local/lib/python2.7/site-packages/assets/chromedriver;
@ajankuv
Copy link
Author

ajankuv commented Oct 31, 2018

Usage: to quickly setup a new instapy venv or reboot a old one with fresh code/fixes.

virtualenv username
cd username/
source bin/activate
wget https://gist.githubusercontent.com/ajankuv/d05bdfb8d543d6b370ca4b438612191b/raw/db179645c7afd6651fa3e641da8a0c85fbd71375/setup.sh
bash setup.sh

from here I normally move my old *.py files with cp ../olddir/*.py .

@Zettt
Copy link

Zettt commented Oct 31, 2018

I think you can pipe the result of wget straight to sh. wget urlforshellscript | sh. Homebrew has done this for a couple years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment