Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
90f46d7ecc | |||
8e872ca9ca | |||
05c95b7025 | |||
442aee08df |
@@ -89,7 +89,7 @@ sync_pkg(){
|
|||||||
local rsync_args=(-aWxvci --progress --delete-before --no-R --no-implied-dirs)
|
local rsync_args=(-aWxvci --progress --delete-before --no-R --no-implied-dirs)
|
||||||
local src="$1" dest="$2" tree="$3"
|
local src="$1" dest="$2" tree="$3"
|
||||||
|
|
||||||
info "Sync from archlinux (%s)" "$git_tree_arch"
|
info "Sync from archlinux (%s)" "$tree"
|
||||||
rsync "${rsync_args[@]}" $src/ $dest/
|
rsync "${rsync_args[@]}" $src/ $dest/
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ from_arch(){
|
|||||||
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
|
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
|
||||||
|
|
||||||
local package=${TREE_DIR_ARCH}/$git_tree_arch/$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
|
src=$package/repos/$repo
|
||||||
|
|
||||||
@@ -141,10 +141,9 @@ from_arch(){
|
|||||||
sync_pkg "$src" "$dest" "$git_tree_arch"
|
sync_pkg "$src" "$dest" "$git_tree_arch"
|
||||||
patch_pkg "$pkg"
|
patch_pkg "$pkg"
|
||||||
else
|
else
|
||||||
[[ $git_tree_arch == 'packages' ]] && git_tree_artix=$git_tree_arch
|
git_tree_artix=$git_tree_arch
|
||||||
[[ $git_tree_arch == 'community' ]] && git_tree_artix=$git_tree_arch
|
|
||||||
|
|
||||||
local pkg_path=${TREE_DIR_ARTIX}/$git_tree_artix/$pkg
|
dest=${TREE_DIR_ARTIX}/$git_tree_artix/$pkg/trunk
|
||||||
|
|
||||||
cd ${TREE_DIR_ARTIX}/$git_tree_artix
|
cd ${TREE_DIR_ARTIX}/$git_tree_artix
|
||||||
|
|
||||||
@@ -158,9 +157,9 @@ from_arch(){
|
|||||||
|
|
||||||
commit_jenkins_files "$pkg"
|
commit_jenkins_files "$pkg"
|
||||||
|
|
||||||
# dest=$pkg_path/trunk
|
prepare_dir "$dest"
|
||||||
|
|
||||||
sync_pkg "$src" "$dest" "$git_tree_arch"
|
sync_pkg "$src" "$dest" "$git_tree_artix"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +169,7 @@ view_build(){
|
|||||||
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
|
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
|
||||||
|
|
||||||
local pkg_path=${TREE_DIR_ARCH}/$git_tree_arch/$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
|
src=$pkg_path/repos/$repo
|
||||||
|
|
||||||
@@ -211,7 +210,7 @@ usage() {
|
|||||||
echo " -z Don't clone or pull arch repos"
|
echo " -z Don't clone or pull arch repos"
|
||||||
echo ' -i Import a package from arch repos'
|
echo ' -i Import a package from arch repos'
|
||||||
echo ' -m Make new remote subrepo and clone it'
|
echo ' -m Make new remote subrepo and clone it'
|
||||||
echo ' -C Configure subrepo url'
|
echo ' -c Configure subrepo url'
|
||||||
echo ' -v View package depends'
|
echo ' -v View package depends'
|
||||||
echo ' -h This help'
|
echo ' -h This help'
|
||||||
echo ''
|
echo ''
|
||||||
|
@@ -29,7 +29,7 @@ show_version_table(){
|
|||||||
for package in ${git[@]}; do
|
for package in ${git[@]}; do
|
||||||
|
|
||||||
local pkg=${package##*/}
|
local pkg=${package##*/}
|
||||||
local artixrepo=$(find_repo "$package" "${unstable}" "${staging}")
|
local artixrepo=$(find_repo "$package" "${staging}" "${unstable}")
|
||||||
local artixshow=${artixrepo%-*}
|
local artixshow=${artixrepo%-*}
|
||||||
local pkgbuild=$package/repos/$artixrepo/PKGBUILD
|
local pkgbuild=$package/repos/$artixrepo/PKGBUILD
|
||||||
|
|
||||||
@@ -38,8 +38,10 @@ show_version_table(){
|
|||||||
source $pkgbuild 2>/dev/null
|
source $pkgbuild 2>/dev/null
|
||||||
local artixver=$(get_full_version $pkg)
|
local artixver=$(get_full_version $pkg)
|
||||||
|
|
||||||
local archpath=$(get_import_path "$pkg")
|
local archpath=$(get_import_path $pkg)
|
||||||
local archrepo=$(find_repo "$archpath" "${unstable}" "${staging}")
|
|
||||||
|
local archrepo=$(find_repo "$archpath" "${staging}" "${unstable}")
|
||||||
|
|
||||||
local archshow=${archrepo%-*}
|
local archshow=${archrepo%-*}
|
||||||
pkgbuild=$archpath/repos/$archrepo/PKGBUILD
|
pkgbuild=$archpath/repos/$archrepo/PKGBUILD
|
||||||
|
|
||||||
@@ -48,19 +50,17 @@ show_version_table(){
|
|||||||
local archver=$(get_full_version $pkg)
|
local archver=$(get_full_version $pkg)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local result=$(vercmp "$artixver" "$archver")
|
||||||
|
|
||||||
|
local repomatch=false
|
||||||
|
[[ "$archrepo" == "$artixrepo" ]] && repomatch=true
|
||||||
|
|
||||||
if ${move};then
|
if ${move};then
|
||||||
|
|
||||||
if [ $(vercmp "$artixver" "$archver") -eq 0 ] || [ $(vercmp "$artixver" "$archver") -gt 0 ];then
|
if [ $result -gt -1 ];then
|
||||||
case $artixrepo in
|
case $artixrepo in
|
||||||
*staging*)
|
*testing*|*staging*)
|
||||||
if [[ "$archrepo" == "$artixrepo" ]];then
|
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"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*testing*)
|
|
||||||
if [[ "$archrepo" == "$artixrepo" ]];then
|
|
||||||
msg_row "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
msg_row "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
||||||
else
|
else
|
||||||
msg_row_notify "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
msg_row_notify "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
||||||
@@ -69,20 +69,22 @@ show_version_table(){
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
elif ${upgrades};then
|
||||||
|
|
||||||
if [ $(vercmp "$artixver" "$archver") -lt 0 ];then
|
if [ $result -eq -1 ];then
|
||||||
${upgrades} && msg_row_upgrade "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
msg_row_upgrade "%-20s %-20s %-25s %-30s %-30s" "$archshow" "$artixshow" "$pkg" "$archver" "$artixver"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $(vercmp "$artixver" "$archver") -gt 0 ];then
|
elif ${downgrades};then
|
||||||
|
|
||||||
|
if [ $result -eq 1 ];then
|
||||||
if [[ -n $archver ]] && [[ -n $archrepo ]];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
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
unset pkgver epoch pkgrel artixver archver
|
unset pkgver epoch pkgrel artixver archver pkgbuild archpath
|
||||||
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -105,12 +107,11 @@ tree_names=(packages community)
|
|||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: ${0##*/} [options]"
|
echo "Usage: ${0##*/} [options]"
|
||||||
echo ' -c Compare packages'
|
|
||||||
echo ' -u Show upgrade packages'
|
echo ' -u Show upgrade packages'
|
||||||
echo ' -d Show downgrade packages'
|
echo ' -d Show downgrade packages'
|
||||||
echo ' -a Show testing packages'
|
echo ' -m Show packages to move'
|
||||||
echo " -y Don't inlcude staging packages"
|
echo " -x Don't inlcude staging packages"
|
||||||
echo ' -x Include unstable kde and gnome'
|
echo ' -y Include unstable kde and gnome'
|
||||||
echo ' -h This help'
|
echo ' -h This help'
|
||||||
echo ''
|
echo ''
|
||||||
echo ''
|
echo ''
|
||||||
@@ -119,15 +120,15 @@ usage() {
|
|||||||
|
|
||||||
orig_argv=("$0" "$@")
|
orig_argv=("$0" "$@")
|
||||||
|
|
||||||
opts='udmyxh'
|
opts='udmxyh'
|
||||||
|
|
||||||
while getopts "${opts}" arg; do
|
while getopts "${opts}" arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
u) upgrades=true ;;
|
u) upgrades=true ;;
|
||||||
d) downgrades=true ;;
|
d) downgrades=true ;;
|
||||||
m) move=true ;;
|
m) move=true ;;
|
||||||
y) staging=false ;;
|
x) staging=false ;;
|
||||||
x) unstable=true ;;
|
y) unstable=true ;;
|
||||||
h|?) usage 0 ;;
|
h|?) usage 0 ;;
|
||||||
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
||||||
esac
|
esac
|
||||||
|
@@ -82,10 +82,10 @@ find_tree(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
find_repo(){
|
find_repo(){
|
||||||
local pkg="$1" unst="$2" stag="$3" repo=
|
local pkg="$1" stag="$2" unst="$3" repo=
|
||||||
local repos=(core extra testing community community-testing mulitilib multilib-testing)
|
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)
|
$unst && repos+=(gnome-unstable kde-unstable)
|
||||||
|
|
||||||
for r in ${repos[@]};do
|
for r in ${repos[@]};do
|
||||||
|
Reference in New Issue
Block a user