forked from mirrored-repos/manjaro-tools
[util-pkg] use new global cache_dir
This commit is contained in:
parent
6317c937eb
commit
1bd915d4db
2 changed files with 14 additions and 26 deletions
|
@ -77,7 +77,7 @@ blacklist_pkg(){
|
||||||
|
|
||||||
prepare_cachedir(){
|
prepare_cachedir(){
|
||||||
mkdir -p "${pkg_dir}"
|
mkdir -p "${pkg_dir}"
|
||||||
chown -R "${pkg_owner}:users" "${pkg_dir_loaded}"
|
#chown -R "${pkg_owner}:users" "${cache_dir}"
|
||||||
}
|
}
|
||||||
|
|
||||||
move_pkg(){
|
move_pkg(){
|
||||||
|
@ -87,7 +87,7 @@ move_pkg(){
|
||||||
else
|
else
|
||||||
mv *.${ext} ${pkg_dir}
|
mv *.${ext} ${pkg_dir}
|
||||||
fi
|
fi
|
||||||
chown -R "${pkg_owner}:users" "${pkg_dir_loaded}"
|
#chown -R "${pkg_owner}:users" "${cache_dir}"
|
||||||
}
|
}
|
||||||
|
|
||||||
chroot_build(){
|
chroot_build(){
|
||||||
|
|
36
lib/util.sh
36
lib/util.sh
|
@ -185,6 +185,12 @@ load_config(){
|
||||||
arch=$(uname -m)
|
arch=$(uname -m)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n ${cache_dir} ]];then
|
||||||
|
cache_dir=${cache_dir}
|
||||||
|
else
|
||||||
|
cache_dir='/var/cache/manjaro-tools'
|
||||||
|
fi
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# manjaro-tools-pkg
|
# manjaro-tools-pkg
|
||||||
###################
|
###################
|
||||||
|
@ -192,7 +198,7 @@ load_config(){
|
||||||
if [[ -n ${profiledir} ]];then
|
if [[ -n ${profiledir} ]];then
|
||||||
profiledir=${profiledir}
|
profiledir=${profiledir}
|
||||||
else
|
else
|
||||||
profiledir="$(dirname $1)/sets"
|
profiledir="${SYSCONFDIR}/sets" #"$(dirname $1)/sets"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${profile} ]];then
|
if [[ -n ${profile} ]];then
|
||||||
|
@ -204,15 +210,9 @@ load_config(){
|
||||||
if [[ -n ${chroots} ]];then
|
if [[ -n ${chroots} ]];then
|
||||||
chroots=${chroots}
|
chroots=${chroots}
|
||||||
else
|
else
|
||||||
chroots='/srv/manjarobuild'
|
chroots='/opt/buildpkg'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${pkg_dir} ]];then
|
|
||||||
pkg_dir=${pkg_dir}
|
|
||||||
else
|
|
||||||
pkg_dir='/var/cache/manjaro-tools'
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n ${blacklist_trigger[@]} ]];then
|
if [[ -n ${blacklist_trigger[@]} ]];then
|
||||||
blacklist_trigger=${blacklist_trigger[@]}
|
blacklist_trigger=${blacklist_trigger[@]}
|
||||||
else
|
else
|
||||||
|
@ -232,20 +232,20 @@ load_config(){
|
||||||
if [[ -n ${work_dir} ]];then
|
if [[ -n ${work_dir} ]];then
|
||||||
work_dir=${work_dir}
|
work_dir=${work_dir}
|
||||||
else
|
else
|
||||||
work_dir=${PWD}
|
work_dir='/opt/buildiso' #${PWD}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${target_dir} ]];then
|
if [[ -n ${target_dir} ]];then
|
||||||
target_dir=${target_dir}
|
target_dir=${target_dir}
|
||||||
else
|
else
|
||||||
target_dir=${PWD}
|
target_dir='/opt/manjaro-iso' #${PWD}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${iso_label} ]];then
|
if [[ -n ${iso_label} ]];then
|
||||||
iso_label=${iso_label}
|
iso_label=${iso_label}
|
||||||
else
|
else
|
||||||
source /etc/lsb-release
|
source /etc/lsb-release
|
||||||
iso_label="MJRO0${DISTRIB_RELEASE//.}"
|
iso_label="MJRO${DISTRIB_RELEASE//.}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${iso_version} ]];then
|
if [[ -n ${iso_version} ]];then
|
||||||
|
@ -353,18 +353,6 @@ load_config(){
|
||||||
else
|
else
|
||||||
start_openrc_live=('bluetooth' 'networkmanager' 'connman')
|
start_openrc_live=('bluetooth' 'networkmanager' 'connman')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${cache_lng} ]];then
|
|
||||||
cache_lng=${cache_lng}
|
|
||||||
else
|
|
||||||
cache_lng='/var/cache/manjaro-tools/lng'
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n ${cache_pkgs} ]];then
|
|
||||||
cache_pkgs=${cache_pkgs}
|
|
||||||
else
|
|
||||||
cache_pkgs='/var/cache/manjaro-tools/pkgs'
|
|
||||||
fi
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue