mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-24 02:22:15 +08:00
This commit is contained in:
parent
76d35aae64
commit
ebddeb904d
48
build.sh
48
build.sh
@ -86,30 +86,32 @@ build_it()
|
||||
if [ "$_build_autoinstall" = "1" ] ; then
|
||||
# Look for the exact package names :
|
||||
|
||||
pushd ${_build_work}/${module} &>/dev/null || exit 1
|
||||
# pushd ${_build_work}/${module} &>/dev/null || exit 1
|
||||
#
|
||||
# # get the pkgnames, different for an array and a bare string
|
||||
# if [ `grep -e "^pkgname=" PKGBUILD | cut -d'=' -f2 | cut -c1` == "(" ] ; then
|
||||
# # fetch the array
|
||||
# _module_names=`pcregrep -M "^pkgname=\(.*(\n.*[^\)\n])*" PKGBUILD | sed s/"^[^\']*"//g | sed s/[^\']$//`
|
||||
# else
|
||||
# _module_names=("`grep -e "^pkgname=" PKGBUILD | cut -d'=' -f2`")
|
||||
# fi
|
||||
#
|
||||
# # version and rel
|
||||
# #_modver=`grep -e "^pkgver=" PKGBUILD | cut -d'=' -f2`
|
||||
# #_modrel=`grep -e "^pkgrel=" PKGBUILD | cut -d'=' -f2`
|
||||
#
|
||||
# popd &>/dev/null
|
||||
#
|
||||
# # build a list of packages and install them at once
|
||||
# _packages_to_install=
|
||||
# for _m in $_module_names ; do
|
||||
# #_pkg_full_name=`eval echo $_m-$_modver-$_modrel-*.pkg.*`
|
||||
# _pkg_full_name=`eval echo $_m-*.pkg.*`
|
||||
# _packages_to_install="$_packages_to_install $PKGDEST/$_pkg_full_name"
|
||||
# done
|
||||
# sudo pacman -Uf $_packages_to_install || exit 1
|
||||
|
||||
# get the pkgnames, different for an array and a bare string
|
||||
if [ `grep -e "^pkgname=" PKGBUILD | cut -d'=' -f2 | cut -c1` == "(" ] ; then
|
||||
# fetch the array
|
||||
_module_names=`pcregrep -M "^pkgname=\(.*(\n.*[^\)\n])*" PKGBUILD | sed s/"^[^\']*"//g | sed s/[^\']$//`
|
||||
else
|
||||
_module_names=("`grep -e "^pkgname=" PKGBUILD | cut -d'=' -f2`")
|
||||
fi
|
||||
|
||||
# version and rel
|
||||
#_modver=`grep -e "^pkgver=" PKGBUILD | cut -d'=' -f2`
|
||||
#_modrel=`grep -e "^pkgrel=" PKGBUILD | cut -d'=' -f2`
|
||||
|
||||
popd &>/dev/null
|
||||
|
||||
# build a list of packages and install them at once
|
||||
_packages_to_install=
|
||||
for _m in $_module_names ; do
|
||||
#_pkg_full_name=`eval echo $_m-$_modver-$_modrel-*.pkg.*`
|
||||
_pkg_full_name=`eval echo $_m-*.pkg.*`
|
||||
_packages_to_install="$_packages_to_install $PKGDEST/$_pkg_full_name"
|
||||
done
|
||||
sudo pacman -Uf $_packages_to_install || exit 1
|
||||
pacman -U _repo/build/${module}*.pkg.*
|
||||
fi
|
||||
|
||||
popd &>/dev/null
|
||||
|
@ -54,7 +54,7 @@ increase_pkgrels() {
|
||||
done
|
||||
;;
|
||||
|
||||
support)
|
||||
fixit)
|
||||
title2 "Increasing support pkgrels"
|
||||
for module in ${whattodo[*]}
|
||||
do
|
||||
@ -192,7 +192,31 @@ MODE=`echo $1`
|
||||
|
||||
# we take the repo name + the job/stage to reconstruct the variable name
|
||||
# in $repo_pkgs.cfg and echo its contents... damn, eval is evil ;)
|
||||
whattodo=($(eval echo "\${_build_${_cur_repo}_${MODE}[@]}"))
|
||||
if [ "$_cur_repo" = "core" ] ; then
|
||||
whattodo=($(eval echo "\${_build_core_${MODE}[@]}"))
|
||||
|
||||
elif [ "$_cur_repo" = "core-testing" ] ; then
|
||||
whattodo=($(eval echo "\${_build_core_testing_${MODE}[@]}"))
|
||||
|
||||
elif [ "$_cur_repo" = "platform" ] ; then
|
||||
whattodo=($(eval echo "\${_build_platform_${MODE}[@]}"))
|
||||
|
||||
elif [ "$_cur_repo" = "platform-testing" ] ; then
|
||||
whattodo=($(eval echo "\${_build_platform_testing_${MODE}[@]}"))
|
||||
|
||||
elif [ "$_cur_repo" = "desktop" ] ; then
|
||||
whattodo=($(eval echo "\${_build_desktop_${MODE}[@]}"))
|
||||
|
||||
elif [ "$_cur_repo" = "desktop-testing" ] ; then
|
||||
whattodo=($(eval echo "\${_build_desktop_testing_${MODE}[@]}"))
|
||||
|
||||
elif [ "$_cur_repo" = "apps" ] ; then
|
||||
whattodo=($(eval echo "\${_build_apps_${MODE}[@]}"))
|
||||
|
||||
elif [ "$_cur_repo" = "apps-testing" ] ; then
|
||||
whattodo=($(eval echo "\${_build_apps_testing_${MODE}[@]}"))
|
||||
|
||||
fi
|
||||
|
||||
increase_pkgrels
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user