1
0
Fork 0
forked from ahurac/dotfiles

Ajout des commandes de updateall

This commit is contained in:
Hippolyte Chauvin 2023-04-13 00:16:36 +02:00
parent 7179c7d98f
commit 0c66ecad1e
5 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,13 @@
# Gathering the outdated packages list
echo "Gathering the outdated packages list..."
py_pkglist=$(pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d '=' -f 1)
# Updating
if [ ! -z "$py_pkglist" ]; then
echo $py_pkglist | xargs -n 1 pip3 install -U
else
echo "All packages are up to date."
fi
# Unsetting the variable
unset py_pkglist

View file

@ -0,0 +1,14 @@
if [[ -d ~/Git ]]; then
pushd "${HOME}/Git" > /dev/null
for repo in ./*; do
cd "$repo"
echo
basename "$repo"
git pull
cd ..
done
popd > /dev/null
else
>&2 echo "\"~/Git\" does not exist!"
fi

View file

@ -0,0 +1,8 @@
# Moving to /tmp folder
#pushd /tmp > /dev/null
# Updating
sudo npm -g update
# Returning to previous directory
#popd > /dev/null

View file

@ -0,0 +1,11 @@
# Gathering orphaned packages list
echo "Gathering orphaned packages list..."
orphaned_packages="$(pacman -Qtdq)"
if [[ ! -z $orphaned_packages ]]; then
echo "$orphaned_packages" | sudo pacman -Rns -
else
echo "No package to be removed."
fi
unset orphaned_packages

View file

@ -0,0 +1,2 @@
# Updating
yay -Syu