diff --git a/fish/functions/pythonBackup.fish b/fish/functions/pythonBackup.fish new file mode 100644 index 0000000..af41379 --- /dev/null +++ b/fish/functions/pythonBackup.fish @@ -0,0 +1,3 @@ +function pythonBackup --description "Python backup" + pip freeze > ~/.dotfiles/python/pip-requirements.txt +end diff --git a/fish/functions/pythonRestore.fish b/fish/functions/pythonRestore.fish new file mode 100644 index 0000000..f081705 --- /dev/null +++ b/fish/functions/pythonRestore.fish @@ -0,0 +1,3 @@ +function pythonRestore --description "Install Python packages" + pip install -r ~/.dotfiles/python/pip-requirements.txt +end diff --git a/zsh/zshrc b/zsh/zshrc index 2179af6..3dac5c5 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -141,6 +141,14 @@ function homebrewRestore () { brew bundle --file ~/.dotfiles/Brewfile } +function pythonBackup () { + pip freeze > ~/.dotfiles/python/pip-requirements.txt +} + +function pythonRestore () { + pip install -r ~/.dotfiles/python/pip-requirements.txt +} + # Encode images in Base64 encodeBase64() { uuencode -m $1 /dev/stdout | sed '1d' | sed '$d'