Skip to content

Instantly share code, notes, and snippets.

@Wilfred
Last active December 15, 2015 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wilfred/5221953 to your computer and use it in GitHub Desktop.
Save Wilfred/5221953 to your computer and use it in GitHub Desktop.
Updating a local Pip cache based on a Jenkins server.
#!/bin/bash
set -e
echo 'Creating ~/.pip-cache...'
mkdir -p ~/.pip-cache
echo 'Writing ~/.pip/pip.conf...'
mkdir -p ~/.pip
if [ ! -f ~/.pip/pip.conf ];
then
echo "[install]
download-cache = ~/.pip-cache" > ~/.pip/pip.conf
fi
echo 'Populating cache from the Jenkins cache...'
rsync -av -e ssh jenkins@jenkins.internal:~/.pip-cache ~/.pip-cache
echo 'Done.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment