forked from artix/artools
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
d5e3d86210 | |||
bfb20645c6 | |||
0b2973e802 |
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2018-19 artoo@artixlinux.org
|
||||
# Copyright (C) 2018-20 artoo@artixlinux.org
|
||||
# Copyright (C) 2018 Artix Linux Developers
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -33,34 +33,65 @@ batch_move() {
|
||||
done < $pkglist
|
||||
}
|
||||
|
||||
# batch_upgrade() {
|
||||
# local pkglist=${TREE_DIR_ARTIX}/pkg_upgrades.list
|
||||
# [[ -f $pkglist ]] || die "%s does not exist!" "$pkglist"
|
||||
# while read entry;do
|
||||
# local pkg=${entry#*:}
|
||||
# local dest=${entry%:*}
|
||||
# echo "buildtree -i -p ${pkg}"
|
||||
# echo "${dest}pkg -u -p ${pkg}"
|
||||
# done < $pkglist
|
||||
# }
|
||||
batch_create() {
|
||||
local name="${1:-pkg_create}"
|
||||
local pkglist=${TREE_DIR_ARTIX}/$name.list
|
||||
[[ -f $pkglist ]] || die "%s does not exist!" "$pkglist"
|
||||
while read entry;do
|
||||
local pkg=${entry##*:}
|
||||
local group=${entry%:*}
|
||||
group=${group#*:}
|
||||
local team=${entry%%:*}
|
||||
if ${runlist}; then
|
||||
buildtree -n -p "${pkg}" -t "${team}" -g "${group}"
|
||||
buildtree -i -p "${pkg}"
|
||||
commitpkg -p "${pkg}"
|
||||
else
|
||||
msg "%s" "buildtree -n -p ${pkg} -t ${team} -g ${group}"
|
||||
msg2 "%s" "buildtree -i -p ${pkg}"
|
||||
msg2 "%s" "commitpkg -p ${pkg}"
|
||||
fi
|
||||
done < $pkglist
|
||||
}
|
||||
|
||||
batch_update() {
|
||||
local name="${1:-pkg_upgrades}"
|
||||
local pkglist=${TREE_DIR_ARTIX}/$name.list
|
||||
[[ -f $pkglist ]] || die "%s does not exist!" "$pkglist"
|
||||
while read entry;do
|
||||
local pkg=${entry#*:}
|
||||
local dest=${entry%:*}
|
||||
if ${runlist}; then
|
||||
buildtree -i -p "${pkg}"
|
||||
"${dest}"pkg -u -p "${pkg}"
|
||||
else
|
||||
msg "buildtree -i -p ${pkg}"
|
||||
msg2 "${dest}pkg -u -p ${pkg}"
|
||||
fi
|
||||
done < $pkglist
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "Usage: ${0##*/} [optional listname]"
|
||||
echo ' -r Run generated commands'
|
||||
echo ' -c Create subrepos from list'
|
||||
echo ' -u Update subrepos from list'
|
||||
echo ' -h This help'
|
||||
echo ''
|
||||
echo ''
|
||||
exit $1
|
||||
}
|
||||
|
||||
movelistname=pkg_moves
|
||||
runlist=false
|
||||
create=false
|
||||
update=false
|
||||
|
||||
opts='rh'
|
||||
opts='rcuh'
|
||||
|
||||
while getopts "${opts}" arg; do
|
||||
case "${arg}" in
|
||||
r) runlist=true ;;
|
||||
c) create=true ;;
|
||||
h|?) usage 0 ;;
|
||||
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
||||
esac
|
||||
@@ -68,6 +99,12 @@ done
|
||||
|
||||
shift $(($OPTIND - 1))
|
||||
|
||||
movelistname="$1"; shift
|
||||
listname="$1"; shift
|
||||
|
||||
batch_move "$movelistname"
|
||||
if ${create};then
|
||||
batch_create "${listname}"
|
||||
elif ${update};then
|
||||
batch_update "${listname}"
|
||||
else
|
||||
batch_move "${listname}"
|
||||
fi
|
||||
|
@@ -30,6 +30,7 @@
|
||||
# packages-wm
|
||||
# packages-devel
|
||||
# packages-lib32
|
||||
# packages-qt6
|
||||
# )
|
||||
|
||||
# HOST_TREE_ARCH=git://git.archlinux.org/svntogit
|
||||
|
@@ -46,7 +46,7 @@ load_pkg_config(){
|
||||
local init_tree=(packages-{openrc,runit,s6})
|
||||
|
||||
local desktop_tree=(
|
||||
packages-{kf5,plasma,kde}
|
||||
packages-{kf5,plasma,kde,qt6}
|
||||
packages-{lxqt,gnome,cinnamon,mate,xfce,wm}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user