forked from mirrored-repos/manjaro-tools
tweak cache dir names
This commit is contained in:
parent
af0cdd5107
commit
97e1dddd17
3 changed files with 29 additions and 30 deletions
|
@ -31,9 +31,9 @@ display_settings(){
|
|||
fi
|
||||
|
||||
msg "PROFILE:"
|
||||
msg2 "buildsets: $(load_sets ${sets_dir_iso})"
|
||||
# msg2 "buildsets: $(load_sets ${sets_dir_iso})"
|
||||
msg2 "buildset_iso: ${buildset_iso}"
|
||||
msg2 "is_buildset: ${is_buildset}"
|
||||
# msg2 "is_buildset: ${is_buildset}"
|
||||
msg2 "initsys: ${initsys}"
|
||||
msg2 "displaymanager: ${displaymanager}"
|
||||
|
||||
|
@ -44,7 +44,7 @@ display_settings(){
|
|||
|
||||
msg "ARGS:"
|
||||
msg2 "clean_first: ${clean_first}"
|
||||
msg2 "clean_cache_pkgs: ${clean_cache_pkgs}"
|
||||
msg2 "clean_cache_xorg: ${clean_cache_xorg}"
|
||||
msg2 "clean_cache_lng: ${clean_cache_lng}"
|
||||
msg2 "custom_pac_conf: ${custom_pac_conf}"
|
||||
msg2 "images_only: ${images_only}"
|
||||
|
@ -55,9 +55,8 @@ display_settings(){
|
|||
msg "PATHS:"
|
||||
msg2 "work_dir: ${work_dir}"
|
||||
msg2 "iso_dir: ${iso_dir}"
|
||||
msg2 "cache_pkgs: ${cache_pkgs}"
|
||||
msg2 "cache_lng: ${cache_lng}"
|
||||
|
||||
msg2 "cache_dir_xorg: ${cache_dir_xorg}"
|
||||
msg2 "cache_dir_lng: ${cache_dir_lng}"
|
||||
# msg2 "pacman_conf: ${pacman_conf}"
|
||||
# msg2 "pacman_mirrors: ${mirrors_conf}"
|
||||
|
||||
|
@ -110,7 +109,7 @@ load_desktop_definition
|
|||
clean_first=true
|
||||
auto_svc_conf=true
|
||||
high_compression=true
|
||||
clean_cache_pkgs=true
|
||||
clean_cache_xorg=true
|
||||
clean_cache_lng=true
|
||||
|
||||
pretend=false
|
||||
|
@ -160,7 +159,7 @@ while getopts "${opts}" arg; do
|
|||
G) iso_only=true ;;
|
||||
q) pretend=true ;;
|
||||
C) custom_pac_conf=true ;;
|
||||
P) clean_cache_pkgs=false ;;
|
||||
P) clean_cache_xorg=false ;;
|
||||
L) clean_cache_lng=false ;;
|
||||
c) clean_first=false ;;
|
||||
z) high_compression=false ;;
|
||||
|
@ -196,9 +195,9 @@ iso_file="${iso_dir}/${img_name}-${desktop}-${iso_version}-${arch}.iso"
|
|||
|
||||
work_dir=${chroots_iso}/${buildset_iso}/${arch}
|
||||
|
||||
cache_lng="${cache_dir}/lng"
|
||||
cache_dir_lng="${cache_dir}/lng"
|
||||
|
||||
cache_pkgs="${cache_dir}/pkgs"
|
||||
cache_dir_xorg="${cache_dir}/xorg"
|
||||
|
||||
displaymanager=$(cat ${PWD}/displaymanager)
|
||||
initsys=$(cat ${PWD}/initsys)
|
||||
|
@ -208,7 +207,7 @@ ${clean_first} && mkiso_args+=(-f)
|
|||
|
||||
check_root "$0" "${orig_argv[@]}"
|
||||
|
||||
eval_buildset "${buildset_iso}" "${sets_dir_iso}"
|
||||
#eval_buildset "${buildset_iso}" "${sets_dir_iso}"
|
||||
|
||||
${pretend} && display_settings && exit 1
|
||||
|
||||
|
@ -220,8 +219,8 @@ fi
|
|||
|
||||
${clean_first} && clean_up
|
||||
|
||||
${clean_cache_pkgs} && clean_cache "${cache_pkgs}"
|
||||
${clean_cache_lng} && clean_cache "${cache_lng}"
|
||||
${clean_cache_xorg} && clean_cache "${cache_dir_xorg}"
|
||||
${clean_cache_lng} && clean_cache "${cache_dir_lng}"
|
||||
|
||||
prepare_buildiso
|
||||
|
||||
|
|
|
@ -375,18 +375,18 @@ copy_livecd_helpers(){
|
|||
|
||||
copy_cache_lng(){
|
||||
msg2 "Copying lng cache ..."
|
||||
cp ${cache_lng}/* ${work_dir}/lng-image/opt/livecd/lng
|
||||
cp ${cache_dir_lng}/* ${work_dir}/lng-image/opt/livecd/lng
|
||||
}
|
||||
|
||||
copy_cache_pkgs(){
|
||||
msg2 "Copying pkgs cache ..."
|
||||
cp ${cache_pkgs}/* ${work_dir}/pkgs-image/opt/livecd/pkgs
|
||||
copy_cache_xorg(){
|
||||
msg2 "Copying xorg pkgs cache ..."
|
||||
cp ${cache_dir_xorg}/* ${work_dir}/pkgs-image/opt/livecd/pkgs
|
||||
}
|
||||
|
||||
prepare_buildiso(){
|
||||
mkdir -p "${iso_dir}"
|
||||
mkdir -p "${cache_pkgs}"
|
||||
mkdir -p "${cache_lng}"
|
||||
mkdir -p "${cache_dir_xorg}"
|
||||
mkdir -p "${cache_dir_lng}"
|
||||
}
|
||||
|
||||
clean_cache(){
|
||||
|
@ -490,7 +490,7 @@ make_iso() {
|
|||
# You may want to move generated iso to some other place
|
||||
# its ugly if you set target dir to $HOME
|
||||
# you need to use root privs to move iso otherwise
|
||||
chown "${OWNER}:users" "${iso_file}"
|
||||
chown -R "${OWNER}:users" "${iso_dir}"
|
||||
msg "Done [Build ISO]"
|
||||
}
|
||||
|
||||
|
@ -630,8 +630,8 @@ make_image_xorg() {
|
|||
aufs_append_de_image "${work_dir}/pkgs-image"
|
||||
fi
|
||||
|
||||
download_to_cache "${work_dir}/pkgs-image" "${cache_pkgs}" "${packages_xorg}"
|
||||
copy_cache_pkgs
|
||||
download_to_cache "${work_dir}/pkgs-image" "${cache_dir_xorg}" "${packages_xorg}"
|
||||
copy_cache_xorg
|
||||
|
||||
if [[ -n "${packages_xorg_cleanup}" ]]; then
|
||||
for xorg_clean in ${packages_xorg_cleanup}; do
|
||||
|
@ -669,10 +669,10 @@ make_image_lng() {
|
|||
fi
|
||||
|
||||
if [[ -n ${packages_lng_kde} ]]; then
|
||||
download_to_cache "${work_dir}/lng-image" "${cache_lng}" "${packages_lng} ${packages_lng_kde}"
|
||||
download_to_cache "${work_dir}/lng-image" "${cache_dir_lng}" "${packages_lng} ${packages_lng_kde}"
|
||||
copy_cache_lng
|
||||
else
|
||||
download_to_cache "${work_dir}/lng-image" "${cache_lng}" "${packages_lng}"
|
||||
download_to_cache "${work_dir}/lng-image" "${cache_dir_lng}" "${packages_lng}"
|
||||
copy_cache_lng
|
||||
fi
|
||||
|
||||
|
|
12
lib/util.sh
12
lib/util.sh
|
@ -191,6 +191,12 @@ load_config(){
|
|||
cache_dir='/var/cache/manjaro-tools'
|
||||
fi
|
||||
|
||||
if [[ -n ${sets_dir} ]];then
|
||||
sets_dir=${sets_dir}
|
||||
else
|
||||
sets_dir="${SYSCONFDIR}/sets"
|
||||
fi
|
||||
|
||||
###################
|
||||
# buildpkg
|
||||
###################
|
||||
|
@ -201,12 +207,6 @@ load_config(){
|
|||
chroots_pkg='/opt/buildpkg'
|
||||
fi
|
||||
|
||||
if [[ -n ${sets_dir} ]];then
|
||||
sets_dir=${sets_dir}
|
||||
else
|
||||
sets_dir="${SYSCONFDIR}/sets"
|
||||
fi
|
||||
|
||||
if [[ -n ${buildset_pkg} ]];then
|
||||
buildset_pkg=${buildset_pkg}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue