Created
January 2, 2022 01:14
-
-
Save mayel/cb1510a118bfa9ca3b903466d59bf49d to your computer and use it in GitHub Desktop.
up - script to keep Manjaro Linux up to date (Package updates, AUR, Node, Ruby and Python libs, etc) via the command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# up - script to keep Manjaro Linux up to date (Package updates, AUR, Node, Ruby and Python libs, etc) via the command line | |
# run this to to install: cp up.sh /usr/local/bin/up && chmod 755 /usr/local/bin/up | |
# and then run it from anywhere by simply entering the command: up | |
# By http://mayel.space | |
printf "WARNING: remember to make a backup with Timeshift first!" | |
printf "\n\nChecking for package updates..." | |
sudo pacman -Sy | |
#sudo pacman -S npm --overwrite '*' # fix in case npm was updated manually | |
#pamac build python2-pynacl-git | |
sudo pacman -Su | |
printf "\nCheck and install AUR updates? (y/n)" | |
read answer | |
if echo "$answer" | grep -iq "^y" ; then | |
pamac upgrade -a | |
fi | |
printf "\nCheck and install JS lib global updates? (y/n)" | |
read answer | |
if echo "$answer" | grep -iq "^y" ; then | |
sudo npm install -g npm | |
sudo npm -g upgrade | |
fi | |
printf "\nCheck and install Ruby gem updates? (y/n)" | |
read answer | |
if echo "$answer" | grep -iq "^y" ; then | |
gem update | |
fi | |
#printf "\nCheck and install Python3 lib updates? (y/n)" | |
#read answer | |
#if echo "$answer" | grep -iq "^y" ; then | |
#sudo pip3 install --upgrade pip | |
#sudo python3 - << END | |
#import pip | |
#from subprocess import call | |
#from pip._internal.utils.misc import get_installed_distributions | |
#for dist in get_installed_distributions(): | |
#call("pip3 install --upgrade " + dist.project_name, shell=True) | |
#END | |
#fi | |
#printf "\nCheck and install Python2 lib updates? (y/n)" | |
#read answer | |
#if echo "$answer" | grep -iq "^y" ; then | |
#sudo pip2 install --upgrade pip | |
#sudo python2 - << END | |
#import pip | |
#from subprocess import call | |
#from pip._internal.utils.misc import get_installed_distributions | |
#for dist in get_installed_distributions(): | |
#call("pip2 install --upgrade " + dist.project_name, shell=True) | |
#END | |
#fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment