forked from artix/artools
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
05c95b7025 | |||
442aee08df |
@@ -122,7 +122,7 @@ from_arch(){
|
||||
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
|
||||
|
||||
local package=${TREE_DIR_ARCH}/$git_tree_arch/$pkg
|
||||
local repo=$(find_repo "$package" "${unstable}")
|
||||
local repo=$(find_repo "$package")
|
||||
|
||||
src=$package/repos/$repo
|
||||
|
||||
@@ -170,7 +170,7 @@ view_build(){
|
||||
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
|
||||
|
||||
local pkg_path=${TREE_DIR_ARCH}/$git_tree_arch/$pkg
|
||||
local repo=$(find_repo "$pkg_path" "${unstable}")
|
||||
local repo=$(find_repo "$pkg_path")
|
||||
|
||||
src=$pkg_path/repos/$repo
|
||||
|
||||
|
@@ -29,7 +29,7 @@ show_version_table(){
|
||||
for package in ${git[@]}; do
|
||||
|
||||
local pkg=${package##*/}
|
||||
local artixrepo=$(find_repo "$package" "${unstable}" "${staging}")
|
||||
local artixrepo=$(find_repo "$package" "${staging}" "${unstable}")
|
||||
local artixshow=${artixrepo%-*}
|
||||
local pkgbuild=$package/repos/$artixrepo/PKGBUILD
|
||||
|
||||
@@ -38,8 +38,10 @@ show_version_table(){
|
||||
source $pkgbuild 2>/dev/null
|
||||
local artixver=$(get_full_version $pkg)
|
||||
|
||||
local archpath=$(get_import_path "$pkg")
|
||||
local archrepo=$(find_repo "$archpath" "${unstable}" "${staging}")
|
||||
local archpath=$(get_import_path $pkg)
|
||||
|
||||
local archrepo=$(find_repo "$archpath" "${staging}" "${unstable}")
|
||||
|
||||
local archshow=${archrepo%-*}
|
||||
pkgbuild=$archpath/repos/$archrepo/PKGBUILD
|
||||
|
||||
@@ -48,19 +50,17 @@ show_version_table(){
|
||||
local archver=$(get_full_version $pkg)
|
||||
fi
|
||||
|
||||
local result=$(vercmp "$artixver" "$archver")
|
||||
|
||||
local repomatch=false
|
||||
[[ "$archrepo" == "$artixrepo" ]] && repomatch=true
|
||||
|
||||
if ${move};then
|
||||
|
||||
if [ $(vercmp "$artixver" "$archver") -eq 0 ] || [ $(vercmp "$artixver" "$archver") -gt 0 ];then
|
||||
if [ $result -gt -1 ];then
|
||||
case $artixrepo in
|
||||
*staging*)
|
||||
if [[ "$archrepo" == "$artixrepo" ]];then
|
||||
msg_row "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
||||
else
|
||||
msg_row_notify "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
||||
fi
|
||||
;;
|
||||
*testing*)
|
||||
if [[ "$archrepo" == "$artixrepo" ]];then
|
||||
*testing*|*staging*)
|
||||
if $repomatch;then
|
||||
msg_row "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
||||
else
|
||||
msg_row_notify "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
||||
@@ -69,20 +69,22 @@ show_version_table(){
|
||||
esac
|
||||
fi
|
||||
|
||||
else
|
||||
elif ${upgrades};then
|
||||
|
||||
if [ $(vercmp "$artixver" "$archver") -lt 0 ];then
|
||||
${upgrades} && msg_row_upgrade "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
||||
if [ $result -eq -1 ];then
|
||||
msg_row_upgrade "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
||||
fi
|
||||
|
||||
if [ $(vercmp "$artixver" "$archver") -gt 0 ];then
|
||||
elif ${downgrades};then
|
||||
|
||||
if [ $result -eq 1 ];then
|
||||
if [[ -n $archver ]] && [[ -n $archrepo ]];then
|
||||
${downgrades} && msg_row_downgrade "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
||||
msg_row_downgrade "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
unset pkgver epoch pkgrel artixver archver
|
||||
unset pkgver epoch pkgrel artixver archver pkgbuild archpath
|
||||
|
||||
fi
|
||||
done
|
||||
@@ -105,12 +107,11 @@ tree_names=(packages community)
|
||||
|
||||
usage() {
|
||||
echo "Usage: ${0##*/} [options]"
|
||||
echo ' -c Compare packages'
|
||||
echo ' -u Show upgrade packages'
|
||||
echo ' -d Show downgrade packages'
|
||||
echo ' -a Show testing packages'
|
||||
echo " -y Don't inlcude staging packages"
|
||||
echo ' -x Include unstable kde and gnome'
|
||||
echo ' -m Show packages to move'
|
||||
echo " -x Don't inlcude staging packages"
|
||||
echo ' -y Include unstable kde and gnome'
|
||||
echo ' -h This help'
|
||||
echo ''
|
||||
echo ''
|
||||
@@ -119,15 +120,15 @@ usage() {
|
||||
|
||||
orig_argv=("$0" "$@")
|
||||
|
||||
opts='udmyxh'
|
||||
opts='udmxyh'
|
||||
|
||||
while getopts "${opts}" arg; do
|
||||
case "${arg}" in
|
||||
u) upgrades=true ;;
|
||||
d) downgrades=true ;;
|
||||
m) move=true ;;
|
||||
y) staging=false ;;
|
||||
x) unstable=true ;;
|
||||
x) staging=false ;;
|
||||
y) unstable=true ;;
|
||||
h|?) usage 0 ;;
|
||||
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
||||
esac
|
||||
|
@@ -82,10 +82,10 @@ find_tree(){
|
||||
}
|
||||
|
||||
find_repo(){
|
||||
local pkg="$1" unst="$2" stag="$3" repo=
|
||||
local repos=(core extra testing community community-testing mulitilib multilib-testing)
|
||||
local pkg="$1" stag="$2" unst="$3" repo=
|
||||
local repos=(core extra testing community community-testing multilib multilib-testing)
|
||||
|
||||
$stag && repos+=(staging community-staging mulitilib-staging)
|
||||
$stag && repos+=(staging community-staging multilib-staging)
|
||||
$unst && repos+=(gnome-unstable kde-unstable)
|
||||
|
||||
for r in ${repos[@]};do
|
||||
|
Reference in New Issue
Block a user