mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
feat: add methods to backup and restore Python environment
This commit is contained in:
3
fish/functions/pythonBackup.fish
Normal file
3
fish/functions/pythonBackup.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function pythonBackup --description "Python backup"
|
||||
pip freeze > ~/.dotfiles/python/pip-requirements.txt
|
||||
end
|
||||
3
fish/functions/pythonRestore.fish
Normal file
3
fish/functions/pythonRestore.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function pythonRestore --description "Install Python packages"
|
||||
pip install -r ~/.dotfiles/python/pip-requirements.txt
|
||||
end
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user