initial commit
This commit is contained in:
27
bin/nomarchy-version-channel
Executable file
27
bin/nomarchy-version-channel
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
if grep -q "https://stable-mirror.nomarchy.org/" /etc/pacman.d/mirrorlist; then
|
||||
mirror="stable"
|
||||
elif grep -q "https://rc-mirror.nomarchy.org/" /etc/pacman.d/mirrorlist; then
|
||||
mirror="rc"
|
||||
elif grep -q "https://mirror.nomarchy.org/" /etc/pacman.d/mirrorlist; then
|
||||
mirror="edge"
|
||||
else
|
||||
mirror="unknown"
|
||||
fi
|
||||
|
||||
if grep -q "https://pkgs.nomarchy.org/stable/" /etc/pacman.conf; then
|
||||
pkgs="stable"
|
||||
elif grep -q "https://pkgs.nomarchy.org/edge/" /etc/pacman.conf; then
|
||||
pkgs="edge"
|
||||
elif grep -q "https://pkgs.nomarchy.org/rc/" /etc/pacman.conf; then
|
||||
pkgs="rc"
|
||||
else
|
||||
pkgs="unknown"
|
||||
fi
|
||||
|
||||
if [[ $mirror == $pkgs ]]; then
|
||||
echo $mirror
|
||||
else
|
||||
echo "$mirror / $pkgs"
|
||||
fi
|
||||
Reference in New Issue
Block a user