Ajout des commandes de updateall
This commit is contained in:
parent
7179c7d98f
commit
0c66ecad1e
5 changed files with 48 additions and 0 deletions
13
local/share/updateall/commands.d/.pip
Normal file
13
local/share/updateall/commands.d/.pip
Normal 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
|
14
local/share/updateall/commands.d/git
Normal file
14
local/share/updateall/commands.d/git
Normal 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
|
||||||
|
|
8
local/share/updateall/commands.d/npm
Normal file
8
local/share/updateall/commands.d/npm
Normal 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
|
11
local/share/updateall/commands.d/pacman
Normal file
11
local/share/updateall/commands.d/pacman
Normal 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
|
2
local/share/updateall/commands.d/yay
Normal file
2
local/share/updateall/commands.d/yay
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Updating
|
||||||
|
yay -Syu
|
Loading…
Reference in a new issue