Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
9b1ef262
Unverified
Commit
9b1ef262
authored
Apr 07, 2023
by
deimosian
Committed by
GitHub
Apr 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(archlinux): unify `upgrade` function (#11597)
Co-authored-by:
Carlo Sala
<
carlosalag@protonmail.com
>
parent
01c82c38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
+26
-5
archlinux.plugin.zsh
plugins/archlinux/archlinux.plugin.zsh
+26
-5
No files found.
plugins/archlinux/archlinux.plugin.zsh
View file @
9b1ef262
...
...
@@ -23,7 +23,6 @@ alias pacfiles='pacman -F'
alias
pacls
=
'pacman -Ql'
alias
pacown
=
'pacman -Qo'
alias
pacupd
=
"sudo pacman -Sy"
alias
upgrade
=
'sudo pacman -Syu'
function
paclist
()
{
# Based on https://bbs.archlinux.org/viewtopic.php?id=93683
...
...
@@ -109,7 +108,6 @@ if (( $+commands[aura] )); then
alias
auupd
=
"sudo aura -Sy"
alias
auupg
=
'sudo sh -c "aura -Syu && aura -Au"'
alias
ausu
=
'sudo sh -c "aura -Syu --no-confirm && aura -Au --no-confirm"'
alias
upgrade
=
'sudo aura -Syu'
# extra bonus specially for aura
alias
auown
=
"aura -Qqo"
...
...
@@ -136,7 +134,6 @@ if (( $+commands[pacaur] )); then
alias
painsd
=
'pacaur -S --asdeps'
alias
pamir
=
'pacaur -Syy'
alias
paupd
=
"pacaur -Sy"
alias
upgrade
=
'pacaur -Syu'
fi
if
((
$+
commands[trizen]
))
;
then
...
...
@@ -158,7 +155,6 @@ if (( $+commands[trizen] )); then
alias
trinsd
=
'trizen -S --asdeps'
alias
trmir
=
'trizen -Syy'
alias
trupd
=
"trizen -Sy"
alias
upgrade
=
'trizen -Syu'
fi
if
((
$+
commands[yay]
))
;
then
...
...
@@ -180,5 +176,30 @@ if (( $+commands[yay] )); then
alias
yainsd
=
'yay -S --asdeps'
alias
yamir
=
'yay -Syy'
alias
yaupd
=
"yay -Sy"
alias
upgrade
=
'yay -Syu'
fi
# Check Arch Linux PGP Keyring before System Upgrade to prevent failure.
function
upgrade
()
{
echo
"[oh-my-zsh] Checking Arch Linux PGP Keyring"
local
installedver
=
"
$(
sudo
pacman
-Qi
archlinux-keyring |
grep
-Po
'(?<=Version : ).*'
)
"
local
currentver
=
"
$(
sudo
pacman
-Si
archlinux-keyring |
grep
-Po
'(?<=Version : ).*'
)
"
if
[
$installedver
!=
$currentver
]
;
then
echo
"[oh-my-zsh] Arch Linux PGP Keyring is out of date."
echo
"[oh-my-zsh] Updating before full system upgrade."
sudo
pacman
-Syu
--needed
--noconfirm
archlinux-keyring
else
echo
"[oh-my-zsh] Arch Linux PGP Keyring is up to date."
fi
echo
"[oh-mh-zsh] Proceeding with full system upgrade."
if
((
$+
commands[yay]
))
;
then
yay
-Syu
elif
((
$+
commands[trizen]
))
;
then
trizen
-Syu
elif
((
$+
commands[pacaur]
))
;
then
pacaur
-Syu
elif
((
$+
commands[aura]
))
;
then
sudo
aura
-Syu
else
sudo
pacman
-Syu
fi
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment