forked from mirrored-repos/manjaro-tools
prepare for 0.9.5.7 release
This commit is contained in:
parent
67ea778f10
commit
523f117006
10 changed files with 131 additions and 139 deletions
67
README.md
67
README.md
|
@ -13,9 +13,9 @@ A user config manjaro-tools.conf can be placed in $HOME/.config.
|
|||
If the userconfig is present, manjaro-tools will load userconfig values, however, if variables have been set in the systemwise /etc/manjaro-tools/manjaro-tools.conf, these values take precedence over the userconfig. Best practise is to leave systemwide file untouched, by default it is commented and shows just initialization values done in code.
|
||||
|
||||
~~~
|
||||
##############################################
|
||||
########### manjaro-tools common #############
|
||||
##############################################
|
||||
##########################################
|
||||
################ common ##################
|
||||
##########################################
|
||||
|
||||
# unset defaults to given value
|
||||
# branch=stable
|
||||
|
@ -26,38 +26,41 @@ If the userconfig is present, manjaro-tools will load userconfig values, however
|
|||
# cache dir where buildpkg or buildiso cache packages
|
||||
# cache_dir=/var/cache/manjaro-tools
|
||||
|
||||
################################################
|
||||
########### manjaro-tools buildpkg #############
|
||||
################################################
|
||||
|
||||
# custom path to sets
|
||||
# profiledir=/etc/manjaro-tools/sets
|
||||
##########################################
|
||||
################ buildpkg ################
|
||||
##########################################
|
||||
|
||||
# default chroot path
|
||||
# chroots=/opt/buildpkg
|
||||
# chroots_pkg=/opt/buildpkg
|
||||
|
||||
# custom path to pkg sets
|
||||
# profile_dir_pkg=/etc/manjaro-tools/sets
|
||||
|
||||
# default set; name without .set extension
|
||||
# profile=default
|
||||
# profile_pkg=default
|
||||
|
||||
############ eudev specific ###############
|
||||
############# eudev specific #############
|
||||
|
||||
# This is only useful if you compile packages against eudev
|
||||
|
||||
# default packages to trigger blacklist
|
||||
# blacklist_trigger=('eudev' 'lib32-eudev' 'upower-pm-utils' 'eudev-systemdcompat' 'lib32-eudev-systemdcompat')
|
||||
# blacklist_trigger=('eudev' 'upower-pm-utils' 'eudev-systemdcompat')
|
||||
|
||||
# default blacklisted packages to remove from chroot
|
||||
# blacklist=('libsystemd')
|
||||
|
||||
################################################
|
||||
########### manjaro-tools buildiso #############
|
||||
################################################
|
||||
##########################################
|
||||
################ buildiso ################
|
||||
##########################################
|
||||
|
||||
# default work dir
|
||||
# work_dir=/opt/buildiso
|
||||
# default work dir where the image chroots are located
|
||||
# chroots_iso=/opt/buildiso
|
||||
|
||||
# default iso target dir
|
||||
# target_dir=/opt/manjaro-iso
|
||||
# default iso dir where the iso file will be stored
|
||||
# iso_dir=/opt/manjaro-iso
|
||||
|
||||
################ iso settings ################
|
||||
##########################################
|
||||
############## iso settings ##############
|
||||
|
||||
# unset defaults to given value
|
||||
# iso_label="MJRO090"
|
||||
|
@ -65,9 +68,6 @@ If the userconfig is present, manjaro-tools will load userconfig values, however
|
|||
# unset defaults to given value
|
||||
# iso_version=0.9.0
|
||||
|
||||
# unset defaults to given value
|
||||
# manjaro_kernel="linux317"
|
||||
|
||||
# unset defaults to given value, specify a date here of have it automatically set
|
||||
# manjaro_version="$(date +%Y.%m)"
|
||||
|
||||
|
@ -84,10 +84,18 @@ If the userconfig is present, manjaro-tools will load userconfig values, however
|
|||
# install_dir=manjaro
|
||||
|
||||
# unset defaults to given value
|
||||
# plymouth_theme=manjaro-elegant
|
||||
# compression=xz
|
||||
|
||||
################ install ################
|
||||
|
||||
# These settings are inherited in live session
|
||||
# Settings will be installed
|
||||
|
||||
# unset defaults to given value
|
||||
# compression=xz
|
||||
# manjaro_kernel="linux317"
|
||||
|
||||
# unset defaults to given value
|
||||
# plymouth_theme=manjaro-elegant
|
||||
|
||||
# unset defaults to given values
|
||||
# names must match systemd service names
|
||||
|
@ -97,7 +105,10 @@ If the userconfig is present, manjaro-tools will load userconfig values, however
|
|||
# names must match openrc service names
|
||||
# start_openrc=('cronie' 'cupsd' 'metalog' 'dbus' 'consolekit' 'acpid')
|
||||
|
||||
########### livecd setup #############
|
||||
################# livecd #################
|
||||
|
||||
# These settings are specific to live session
|
||||
# Settings will not be installed
|
||||
|
||||
# unset defaults to given value
|
||||
# hostname="manjaro"
|
||||
|
@ -119,7 +130,7 @@ If the userconfig is present, manjaro-tools will load userconfig values, however
|
|||
# unset defaults to given values,
|
||||
# names must match openrc service names
|
||||
# services in start_openrc array don't need to be listed here
|
||||
# start_openrc_live=('bluetooth' 'networkmanager' 'connman')
|
||||
# start_openrc_live=('bluetooth' 'networkmanager')
|
||||
~~~
|
||||
|
||||
1.1. new config files in iso profiles
|
||||
|
|
|
@ -31,7 +31,7 @@ display_settings(){
|
|||
fi
|
||||
|
||||
msg "PROFILE:"
|
||||
msg2 "iso_profile: ${iso_profile}"
|
||||
msg2 "profile_iso: ${profile_iso}"
|
||||
msg2 "initsys: ${initsys}"
|
||||
msg2 "displaymanager: ${displaymanager}"
|
||||
|
||||
|
@ -98,15 +98,7 @@ display_settings(){
|
|||
fi
|
||||
}
|
||||
|
||||
iso_owner=${SUDO_USER:-$USER}
|
||||
|
||||
if [[ -n $SUDO_USER ]]; then
|
||||
eval "USER_HOME=~$SUDO_USER"
|
||||
else
|
||||
USER_HOME=$HOME
|
||||
fi
|
||||
|
||||
USER_CONFIG="$USER_HOME/.config"
|
||||
load_user_info
|
||||
|
||||
load_config "${USER_CONFIG}/manjaro-tools.conf"
|
||||
load_config "${SYSCONFDIR}/manjaro-tools.conf"
|
||||
|
@ -129,13 +121,13 @@ pacman_conf_arch='default'
|
|||
|
||||
usage() {
|
||||
echo "Usage: ${0##*/} [options]"
|
||||
echo ' -a <arch> Set arch'
|
||||
echo ' -a <arch> Arch'
|
||||
echo " [default: ${arch}]"
|
||||
echo ' -b <branch> Set branch'
|
||||
echo ' -b <branch> Branch'
|
||||
echo " [default: ${branch}]"
|
||||
echo ' -r <dir> Chroots directory'
|
||||
echo " [default: ${chroots_iso}]"
|
||||
echo ' -t <dir> Target iso directory'
|
||||
echo ' -t <dir> Iso directory'
|
||||
echo " [default: ${iso_dir}]"
|
||||
echo ' -v Verbose iso compression'
|
||||
echo ' -q Query settings and pretend build'
|
||||
|
@ -197,9 +189,9 @@ mkiso_args+=(-a ${arch} -D ${install_dir} -L ${iso_label} -c ${compression})
|
|||
|
||||
iso_file="${iso_dir}/${img_name}-${desktop}-${iso_version}-${arch}.iso"
|
||||
|
||||
iso_profile=${PWD##*/}
|
||||
profile_iso=${PWD##*/}
|
||||
|
||||
work_dir=${chroots_iso}/${iso_profile}/${arch}
|
||||
work_dir=${chroots_iso}/${profile_iso}/${arch}
|
||||
|
||||
cache_lng="${cache_dir}/lng"
|
||||
|
||||
|
|
|
@ -31,6 +31,11 @@ display_settings(){
|
|||
msg2 "manjaro_tools_conf: ${manjaro_tools_conf}"
|
||||
fi
|
||||
|
||||
msg "PROFILE:"
|
||||
msg2 "sets_pkg: $(load_sets)"
|
||||
msg2 "profile_pkg: ${profile_pkg}"
|
||||
msg2 "is_profile ${is_profile}"
|
||||
|
||||
msg "OPTIONS:"
|
||||
msg2 "arch: ${arch}"
|
||||
msg2 "branch: ${branch}"
|
||||
|
@ -42,11 +47,11 @@ display_settings(){
|
|||
msg2 "namcap: ${namcap}"
|
||||
msg2 "sign: ${sign}"
|
||||
msg2 "makepkg_args: ${makepkg_args[*]}"
|
||||
msg2 "mkchrootpkg_args: ${mkchrootpkg_args[*]}"
|
||||
# msg2 "mkchrootpkg_args: ${mkchrootpkg_args[*]}"
|
||||
|
||||
msg "PATHS:"
|
||||
msg2 "work_dir: ${work_dir}"
|
||||
msg2 "sets_dir: ${sets_dir}"
|
||||
msg2 "profile_dir_pkg: ${profile_dir_pkg}"
|
||||
msg2 "pkg_dir: ${pkg_dir}"
|
||||
# msg2 "pacman_conf: ${pacman_conf}"
|
||||
# msg2 "makepkg_conf: ${makepkg_conf}"
|
||||
|
@ -60,20 +65,14 @@ display_settings(){
|
|||
msg "PKG:"
|
||||
msg2 "base_packages: ${base_packages[*]}"
|
||||
fi
|
||||
|
||||
msg "SETS:"
|
||||
msg2 "profiles: $(load_sets)"
|
||||
msg2 "profile: ${profile}"
|
||||
msg2 "is_profile: ${is_profile}"
|
||||
|
||||
|
||||
msg "BUILD QUEUE:"
|
||||
if ${is_profile};then
|
||||
msg "Build queue:"
|
||||
local list=$(cat ${sets_dir}/${profile}.set)
|
||||
local list=$(cat ${profile_dir_pkg}/${profile_pkg}.set)
|
||||
for item in ${list[@]}; do
|
||||
msg2 "$item"
|
||||
done
|
||||
else
|
||||
msg "Build queue:"
|
||||
for arg in "${makepkg_args[@]}"; do
|
||||
case ${arg} in
|
||||
--pkg) continue ;;
|
||||
|
@ -88,22 +87,12 @@ display_settings(){
|
|||
done
|
||||
unset IFS
|
||||
else
|
||||
msg2 "${profile}"
|
||||
msg2 "${profile_pkg}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
export LC_MESSAGES=C
|
||||
|
||||
pkg_owner=${SUDO_USER:-$USER}
|
||||
|
||||
if [[ -n $SUDO_USER ]]; then
|
||||
eval "USER_HOME=~$SUDO_USER"
|
||||
else
|
||||
USER_HOME=$HOME
|
||||
fi
|
||||
|
||||
USER_CONFIG="$USER_HOME/.config"
|
||||
load_user_info
|
||||
|
||||
load_config "${USER_CONFIG}/manjaro-tools.conf"
|
||||
load_config "${SYSCONFDIR}/manjaro-tools.conf"
|
||||
|
@ -123,9 +112,9 @@ sign=false
|
|||
|
||||
usage() {
|
||||
echo "Usage: ${0##*/} [options] [--] [makepkg args]"
|
||||
echo " -p <profile> Set profile or pkg [default: ${profile}]"
|
||||
echo " -a <arch> Set arch [default: ${arch}]"
|
||||
echo " -b <branch> Set branch [default: ${branch}]"
|
||||
echo " -p <pkg> Set or pkg [default: ${profile_pkg}]"
|
||||
echo " -a <arch> Arch [default: ${arch}]"
|
||||
echo " -b <branch> Branch [default: ${branch}]"
|
||||
echo " -r <dir> Chroots directory [default: ${chroots_pkg}]"
|
||||
echo ' -c Recreate chroot'
|
||||
echo ' -w Clean up'
|
||||
|
@ -144,7 +133,7 @@ opts='p:a:b:r:cwnsqh'
|
|||
|
||||
while getopts "${opts}" arg; do
|
||||
case "${arg}" in
|
||||
p) profile="$OPTARG" ;;
|
||||
p) profile_pkg="$OPTARG" ;;
|
||||
a) arch="$OPTARG" ;;
|
||||
b) branch="$OPTARG" ;;
|
||||
r) chroots_pkg="$OPTARG" ;;
|
||||
|
@ -181,7 +170,7 @@ check_root "$0" "${orig_argv[@]}"
|
|||
|
||||
[[ -d "${pkg_dir}" ]] || prepare_cachedir
|
||||
|
||||
eval_profile "${profile}"
|
||||
eval_profile "${profile_pkg}"
|
||||
|
||||
${pretend} && display_settings && exit
|
||||
|
||||
|
|
|
@ -67,40 +67,40 @@ else
|
|||
fi
|
||||
|
||||
copy_hostconf () {
|
||||
cp -a /etc/pacman.d/gnupg "$working_dir/etc/pacman.d"
|
||||
cp -a /etc/pacman.d/gnupg "$1/etc/pacman.d"
|
||||
|
||||
[[ -n $pac_conf ]] && cp $pac_conf "$working_dir/etc/pacman.conf"
|
||||
[[ -n $makepkg_conf ]] && cp $makepkg_conf "$working_dir/etc/makepkg.conf"
|
||||
[[ -n $mirrors_conf ]] && cp ${mirrors_conf} "${working_dir}/etc/pacman-mirrors.conf"
|
||||
[[ -n $pac_conf ]] && cp $pac_conf "$1/etc/pacman.conf"
|
||||
[[ -n $makepkg_conf ]] && cp $makepkg_conf "$1/etc/makepkg.conf"
|
||||
[[ -n $mirrors_conf ]] && cp ${mirrors_conf} "$1/etc/pacman-mirrors.conf"
|
||||
|
||||
if ${build_locales};then
|
||||
local host_mirror=$(pacman -Sddp community/manjaro-tools 2>/dev/null | sed -E "s#(.*/)(.*/)community/.*#\1branch/\$repo/\$arch#")
|
||||
[[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
|
||||
|
||||
local branch=$(cat "${working_dir}/etc/pacman-mirrors.conf" | grep '^Branch=' | sed 's/Branch=\s*//g')
|
||||
local branch=$(cat "$1/etc/pacman-mirrors.conf" | grep '^Branch=' | sed 's/Branch=\s*//g')
|
||||
|
||||
host_mirror=$(echo "$host_mirror" | sed -E "s#/branch/#/${branch}/#")
|
||||
echo "Server = $host_mirror" > "$working_dir/etc/pacman.d/mirrorlist"
|
||||
echo "Server = $host_mirror" > "$1/etc/pacman.d/mirrorlist"
|
||||
else
|
||||
source ${working_dir}/etc/pacman-mirrors.conf
|
||||
sed -e "s|/stable|/${Branch}|g" -i "$working_dir/etc/pacman.d/mirrorlist"
|
||||
source $1/etc/pacman-mirrors.conf
|
||||
sed -e "s|/stable|/${Branch}|g" -i "$1/etc/pacman.d/mirrorlist"
|
||||
fi
|
||||
|
||||
sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${cache_dirs[@]})|g" -i "$working_dir/etc/pacman.conf"
|
||||
sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${cache_dirs[@]})|g" -i "$1/etc/pacman.conf"
|
||||
}
|
||||
|
||||
build_mount_args() {
|
||||
chroot_mount "/etc/resolv.conf" "${working_dir}/etc/resolv.conf" -B
|
||||
chroot_mount "${cache_dirs[0]}" "${working_dir}${cache_dirs[0]}" -B
|
||||
chroot_extra_umount() {
|
||||
chroot_mount "/etc/resolv.conf" "$1/etc/resolv.conf" -B
|
||||
chroot_mount "${cache_dirs[0]}" "$1${cache_dirs[0]}" -B
|
||||
|
||||
for cache_dir in ${cache_dirs[@]:1}; do
|
||||
chroot_mount "$cache_dir" "${working_dir}${cache_dir}" -Br
|
||||
chroot_mount "$cache_dir" "$1${cache_dir}" -Br
|
||||
done
|
||||
|
||||
if [[ -n ${mountargs_ro[@]} ]];then
|
||||
local IFS=','
|
||||
for m in ${mountargs_ro[@]}; do
|
||||
chroot_mount "${m%%:*}" "${working_dir}${m##*:}" -Br
|
||||
chroot_mount "${m%%:*}" "$1${m##*:}" -Br
|
||||
done
|
||||
unset IFS
|
||||
fi
|
||||
|
@ -108,7 +108,7 @@ build_mount_args() {
|
|||
if [[ -n ${mountargs_rw[@]} ]];then
|
||||
local IFS=','
|
||||
for m in ${mountargs_rw[@]}; do
|
||||
chroot_mount "${m%%:*}" "${working_dir}${m##*:}" -B
|
||||
chroot_mount "${m%%:*}" "$1${m##*:}" -B
|
||||
done
|
||||
unset IFS
|
||||
fi
|
||||
|
@ -125,9 +125,9 @@ fi
|
|||
|
||||
chroot_api_mount "${working_dir}" || die "failed to setup API filesystems in chroot %s" "${working_dir}"
|
||||
|
||||
build_mount_args
|
||||
chroot_extra_umount "${working_dir}"
|
||||
|
||||
copy_hostconf
|
||||
copy_hostconf "${working_dir}"
|
||||
|
||||
eval $(grep '^CARCH=' "$working_dir/etc/makepkg.conf")
|
||||
|
||||
|
|
|
@ -111,11 +111,7 @@ for arg in "${@:OPTIND}"; do
|
|||
esac
|
||||
done
|
||||
|
||||
if [[ -n $SUDO_USER ]]; then
|
||||
eval "USER_HOME=~$SUDO_USER"
|
||||
else
|
||||
USER_HOME=$HOME
|
||||
fi
|
||||
load_user_info
|
||||
|
||||
# {{{ functions
|
||||
|
||||
|
|
28
bin/mkset.in
28
bin/mkset.in
|
@ -16,44 +16,36 @@ SYSCONFDIR='@sysconfdir@'
|
|||
[[ -r @libdir@/util-msg.sh ]] && source @libdir@/util-msg.sh
|
||||
[[ -r @libdir@/util.sh ]] && source @libdir@/util.sh
|
||||
|
||||
set_owner=${SUDO_USER:-$USER}
|
||||
|
||||
if [[ -n $SUDO_USER ]]; then
|
||||
eval "USER_HOME=~$SUDO_USER"
|
||||
else
|
||||
USER_HOME=$HOME
|
||||
fi
|
||||
|
||||
USER_CONFIG="$USER_HOME/.config"
|
||||
load_user_info
|
||||
|
||||
load_config "${USER_CONFIG}/manjaro-tools.conf"
|
||||
load_config "${SYSCONFDIR}/manjaro-tools.conf"
|
||||
|
||||
create_set(){
|
||||
msg "Creating [${sets_dir}/${name}.set] ..."
|
||||
if [[ -f ${sets_dir}/${name}.set ]];then
|
||||
msg2 "Backing up ${sets_dir}/${name}.set.orig"
|
||||
mv "${sets_dir}/${name}.set" "${sets_dir}/${name}.set.orig"
|
||||
msg "Creating [${profile_dir_pkg}/${name}.set] ..."
|
||||
if [[ -f ${profile_dir_pkg}/${name}.set ]];then
|
||||
msg2 "Backing up ${profile_dir_pkg}/${name}.set.orig"
|
||||
mv "${profile_dir_pkg}/${name}.set" "${profile_dir_pkg}/${name}.set.orig"
|
||||
fi
|
||||
local list=$(find * -maxdepth 0 -type d | sort)
|
||||
for item in ${list[@]};do
|
||||
cd $item
|
||||
if [[ -f PKGBUILD ]];then
|
||||
msg2 "Adding ${item##*/}"
|
||||
echo ${item##*/} >> ${sets_dir}/${name}.set || break
|
||||
echo ${item##*/} >> ${profile_dir_pkg}/${name}.set || break
|
||||
fi
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
|
||||
remove_set(){
|
||||
msg "Removing [${sets_dir}/${name}.set] ..."
|
||||
rm ${sets_dir}/${name}.set
|
||||
msg "Removing [${profile_dir_pkg}/${name}.set] ..."
|
||||
rm ${profile_dir_pkg}/${name}.set
|
||||
}
|
||||
|
||||
show_set(){
|
||||
local list=$(cat ${sets_dir}/${name}.set)
|
||||
msg "Content of [${sets_dir}/${name}.set] ..."
|
||||
local list=$(cat ${profile_dir_pkg}/${name}.set)
|
||||
msg "Content of [${profile_dir_pkg}/${name}.set] ..."
|
||||
for item in ${list[@]}; do
|
||||
msg2 "$item"
|
||||
done
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
################ buildpkg ################
|
||||
##########################################
|
||||
|
||||
# custom path to sets
|
||||
# sets_dir=/etc/manjaro-tools/sets
|
||||
|
||||
# default chroot path
|
||||
# chroots_pkg=/opt/buildpkg
|
||||
|
||||
# custom path to pkg sets
|
||||
# profile_dir_pkg=/etc/manjaro-tools/sets
|
||||
|
||||
# default set; name without .set extension
|
||||
# profile=default
|
||||
# profile_pkg=default
|
||||
|
||||
############# eudev specific #############
|
||||
|
||||
|
|
|
@ -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 "${iso_owner}:users" "${iso_file}"
|
||||
chown "${OWNER}:users" "${iso_file}"
|
||||
msg "Done [Build ISO]"
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ blacklist_pkg(){
|
|||
|
||||
prepare_cachedir(){
|
||||
mkdir -p "${pkg_dir}"
|
||||
chown -R "${pkg_owner}:users" "${pkg_dir}"
|
||||
chown -R "${OWNER}:users" "${pkg_dir}"
|
||||
}
|
||||
|
||||
move_pkg(){
|
||||
|
@ -87,13 +87,13 @@ move_pkg(){
|
|||
else
|
||||
mv *.${ext} ${pkg_dir}
|
||||
fi
|
||||
chown -R "${pkg_owner}:users" "${pkg_dir}"
|
||||
chown -R "${OWNER}:users" "${pkg_dir}"
|
||||
}
|
||||
|
||||
chroot_build(){
|
||||
if ${is_profile};then
|
||||
msg "Start building profile: [${profile}]"
|
||||
for pkg in $(cat ${sets_dir}/${profile}.set); do
|
||||
msg "Start building profile_pkg [${profile_pkg}]"
|
||||
for pkg in $(cat ${profile_dir_pkg}/${profile_pkg}.set); do
|
||||
cd $pkg
|
||||
for p in ${blacklist_trigger[@]}; do
|
||||
[[ $pkg == $p ]] && blacklist_pkg "${work_dir}"
|
||||
|
@ -103,11 +103,11 @@ chroot_build(){
|
|||
move_pkg
|
||||
cd ..
|
||||
done
|
||||
msg "Finished building profile: [${profile}]"
|
||||
msg "Finished building profile_pkg [${profile_pkg}]"
|
||||
else
|
||||
cd ${profile}
|
||||
cd ${profile_pkg}
|
||||
for p in ${blacklist_trigger[@]}; do
|
||||
[[ ${profile} == $p ]] && blacklist_pkg "${work_dir}"
|
||||
[[ ${profile_pkg} == $p ]] && blacklist_pkg "${work_dir}"
|
||||
done
|
||||
setarch "${arch}" \
|
||||
mkchrootpkg ${mkchrootpkg_args[*]} -- ${makepkg_args[*]} || abort
|
||||
|
@ -129,7 +129,7 @@ chroot_init(){
|
|||
|
||||
sign_pkgs(){
|
||||
cd ${pkg_dir}
|
||||
su "${pkg_owner}" <<'EOF'
|
||||
su "${OWNER}" <<'EOF'
|
||||
signpkgs
|
||||
EOF
|
||||
}
|
||||
|
|
42
lib/util.sh
42
lib/util.sh
|
@ -195,24 +195,24 @@ load_config(){
|
|||
# buildpkg
|
||||
###################
|
||||
|
||||
if [[ -n ${sets_dir} ]];then
|
||||
sets_dir=${sets_dir}
|
||||
else
|
||||
sets_dir="${SYSCONFDIR}/sets" #"$(dirname $1)/sets"
|
||||
fi
|
||||
|
||||
if [[ -n ${profile} ]];then
|
||||
profile=${profile}
|
||||
else
|
||||
profile='default'
|
||||
fi
|
||||
|
||||
if [[ -n ${chroots_pkg} ]];then
|
||||
chroots_pkg=${chroots_pkg}
|
||||
else
|
||||
chroots_pkg='/opt/buildpkg'
|
||||
fi
|
||||
|
||||
|
||||
if [[ -n ${profile_dir_pkg} ]];then
|
||||
profile_dir_pkg=${profile_dir_pkg}
|
||||
else
|
||||
profile_dir_pkg="${SYSCONFDIR}/sets"
|
||||
fi
|
||||
|
||||
if [[ -n ${profile_pkg} ]];then
|
||||
profile_pkg=${profile_pkg}
|
||||
else
|
||||
profile_pkg='default'
|
||||
fi
|
||||
|
||||
if [[ -n ${blacklist_trigger[@]} ]];then
|
||||
blacklist_trigger=${blacklist_trigger[@]}
|
||||
else
|
||||
|
@ -232,13 +232,13 @@ load_config(){
|
|||
if [[ -n ${chroots_iso} ]];then
|
||||
chroots_iso=${chroots_iso}
|
||||
else
|
||||
chroots_iso='/opt/buildiso' #${PWD}
|
||||
chroots_iso='/opt/buildiso'
|
||||
fi
|
||||
|
||||
if [[ -n ${iso_dir} ]];then
|
||||
iso_dir=${iso_dir}
|
||||
else
|
||||
iso_dir='/opt/manjaro-iso' #${PWD}
|
||||
iso_dir='/opt/manjaro-iso'
|
||||
fi
|
||||
|
||||
if [[ -n ${iso_label} ]];then
|
||||
|
@ -365,3 +365,15 @@ load_sets(){
|
|||
done
|
||||
echo $prof
|
||||
}
|
||||
|
||||
load_user_info(){
|
||||
OWNER=${SUDO_USER:-$USER}
|
||||
|
||||
if [[ -n $SUDO_USER ]]; then
|
||||
eval "USER_HOME=~$SUDO_USER"
|
||||
else
|
||||
USER_HOME=$HOME
|
||||
fi
|
||||
|
||||
USER_CONFIG="$USER_HOME/.config"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue