Skip to content

A simple bash script to keep global python up to date.

License

Notifications You must be signed in to change notification settings

caiomts/python_update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Python Version Update

A simple bash script to keep my global python up to date.

Requirements

  • pyenv

Quick Start

Clone this repo

$ git clone https://github.com/caiomts/python_update.git

Turning the script executable

$ cd python_update
$ chmod +x pyupdate.sh 

How to run it

$ . /path/to/the/script/pyupdate.sh 

The script will create a $XDG_CONFIG_HOME/pyupdate folder and save a requirements.txt file in it. You can write down all packages you use with PIPX and the script will install all of them for you in your updated python version.

How I use it (Linux OS)

I keep a folder in my HOME with symlinks to all my shell scripts and I add this folder into my PATH. This way I can call any shell script no matter where by name.

1. Creating a folder in HOME.

$ cd ~
$ mkdir your_folder_name

2. Adding the folder to your PATH.

In my case the bash config file is .bashrc in my HOME, but it can be bash_profile or another one depending on the distro you are using.

$ echo 'export PATH="$PATH:$HOME/your_folder_name"' >> .bashrc

3. Creating a symlink

$ ln -s /path/to/the/script/pyupdate.sh ~/your_folder_name/pyupdate

Crontab

In this case I create a cronjob to run weekly so I don't need to bother me with it.

About

A simple bash script to keep global python up to date.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages