whitespace pedantry

This commit is contained in:
Bernhard Landauer 2018-04-14 00:07:43 +02:00
parent 52e415f11d
commit b6023bf92f
16 changed files with 69 additions and 69 deletions

View file

@ -99,11 +99,11 @@ fi
# kill chroot process if needed (TODO: check if needed at all) # kill chroot process if needed (TODO: check if needed at all)
kill_chroot_process "$newroot" kill_chroot_process "$newroot"
if ${copykeyring};then if ${copykeyring}; then
copy_keyring "$newroot" copy_keyring "$newroot"
fi fi
if ${copymirrorlist};then if ${copymirrorlist}; then
copy_mirrorlist "$newroot" copy_mirrorlist "$newroot"
fi fi

View file

@ -22,7 +22,7 @@ import ${LIBDIR}/util.sh
show_profile(){ show_profile(){
prepare_profile "$1" prepare_profile "$1"
msg2 "iso_file: %s" "${iso_file}" msg2 "iso_file: %s" "${iso_file}"
if ${verbose};then if ${verbose}; then
msg2 "autologin: %s" "${autologin}" msg2 "autologin: %s" "${autologin}"
msg2 "nonfree_mhwd: %s" "${nonfree_mhwd}" msg2 "nonfree_mhwd: %s" "${nonfree_mhwd}"
@ -44,7 +44,7 @@ show_profile(){
msg2 "addgroups: %s" "${addgroups}" msg2 "addgroups: %s" "${addgroups}"
[[ -n ${smb_workgroup} ]] && msg2 "smb_workgroup: %s" "${smb_workgroup}" [[ -n ${smb_workgroup} ]] && msg2 "smb_workgroup: %s" "${smb_workgroup}"
if [[ ${initsys} == 'systemd' ]];then if [[ ${initsys} == 'systemd' ]]; then
msg2 "enable_systemd: %s" "${enable_systemd[*]}" msg2 "enable_systemd: %s" "${enable_systemd[*]}"
msg2 "enable_systemd_live: %s" "${enable_systemd_live[*]}" msg2 "enable_systemd_live: %s" "${enable_systemd_live[*]}"
[[ -n ${disable_systemd[*]} ]] && msg2 "disable_systemd: %s" "${disable_systemd[*]}" [[ -n ${disable_systemd[*]} ]] && msg2 "disable_systemd: %s" "${disable_systemd[*]}"

View file

@ -58,7 +58,7 @@ display_settings(){
msg "PATHS:" msg "PATHS:"
msg2 "pkg_dir: %s" "${pkg_dir}" msg2 "pkg_dir: %s" "${pkg_dir}"
if ${clean_first};then if ${clean_first}; then
msg "PKG:" msg "PKG:"
msg2 "base_packages: %s" "${base_packages[*]}" msg2 "base_packages: %s" "${base_packages[*]}"
fi fi

View file

@ -44,7 +44,7 @@ show_profile(){
msg2 "login_shell: %s" "${login_shell}" msg2 "login_shell: %s" "${login_shell}"
msg2 "addgroups: %s" "${addgroups}" msg2 "addgroups: %s" "${addgroups}"
if [[ ${initsys} == 'systemd' ]];then if [[ ${initsys} == 'systemd' ]]; then
msg2 "enable_systemd: %s" "${enable_systemd[*]}" msg2 "enable_systemd: %s" "${enable_systemd[*]}"
msg2 "enable_systemd_live: %s" "${enable_systemd_live[*]}" msg2 "enable_systemd_live: %s" "${enable_systemd_live[*]}"
[[ -n ${disable_systemd[*]} ]] && msg2 "disable_systemd: %s" "${disable_systemd[*]}" [[ -n ${disable_systemd[*]} ]] && msg2 "disable_systemd: %s" "${disable_systemd[*]}"

View file

@ -81,7 +81,7 @@ copy_hostconf () {
[[ -n $makepkg_conf ]] && cp $makepkg_conf "$1/etc/makepkg.conf" [[ -n $makepkg_conf ]] && cp $makepkg_conf "$1/etc/makepkg.conf"
[[ -n $mirrors_conf ]] && cp ${mirrors_conf} "$1/etc/pacman-mirrors.conf" [[ -n $mirrors_conf ]] && cp ${mirrors_conf} "$1/etc/pacman-mirrors.conf"
if [[ -n ${build_mirror} ]];then if [[ -n ${build_mirror} ]]; then
build_mirror=${build_mirror}'/$repo/$arch' build_mirror=${build_mirror}'/$repo/$arch'
if ${keep_mirrors}; then if ${keep_mirrors}; then
set_branch "$1" "$(get_branch $1)" set_branch "$1" "$(get_branch $1)"
@ -103,7 +103,7 @@ chroot_extra_umount() {
chroot_mount "$cache_dir" "$1${cache_dir}" -Br chroot_mount "$cache_dir" "$1${cache_dir}" -Br
done done
if [[ -n ${mountargs_ro[@]} ]];then if [[ -n ${mountargs_ro[@]} ]]; then
local IFS=',' local IFS=','
for m in ${mountargs_ro[@]}; do for m in ${mountargs_ro[@]}; do
chroot_mount "${m%%:*}" "$1${m##*:}" -Br chroot_mount "${m%%:*}" "$1${m##*:}" -Br
@ -111,7 +111,7 @@ chroot_extra_umount() {
unset IFS unset IFS
fi fi
if [[ -n ${mountargs_rw[@]} ]];then if [[ -n ${mountargs_rw[@]} ]]; then
local IFS=',' local IFS=','
for m in ${mountargs_rw[@]}; do for m in ${mountargs_rw[@]}; do
chroot_mount "${m%%:*}" "$1${m##*:}" -B chroot_mount "${m%%:*}" "$1${m##*:}" -B

View file

@ -44,7 +44,7 @@ display_settings(){
msg2 "verbose: %s" "${verbose}" msg2 "verbose: %s" "${verbose}"
msg2 "torrent: %s" "${torrent}" msg2 "torrent: %s" "${torrent}"
if ${torrent};then if ${torrent}; then
msg2 "tracker_url: %s" "${tracker_url}" msg2 "tracker_url: %s" "${tracker_url}"
msg2 "piece_size: %s" "${piece_size}" msg2 "piece_size: %s" "${piece_size}"
msg2 "iso_mirrors: %s" "${iso_mirrors[*]}" msg2 "iso_mirrors: %s" "${iso_mirrors[*]}"

View file

@ -71,7 +71,7 @@ shift $(( OPTIND - 1 ))
check_root "$0" "${orig_argv[@]}" check_root "$0" "${orig_argv[@]}"
if ${automount};then if ${automount}; then
chrootdir=/mnt chrootdir=/mnt
run_args=/bin/bash run_args=/bin/bash

View file

@ -107,7 +107,7 @@ fi
echo "$version" > "$working_dir/.manjaro-tools" echo "$version" > "$working_dir/.manjaro-tools"
if ${build_locales};then if ${build_locales}; then
info "Using build locales ..." info "Using build locales ..."
mv "$working_dir/etc/locale.gen" "$working_dir/etc/locale.gen.bak" mv "$working_dir/etc/locale.gen" "$working_dir/etc/locale.gen.bak"
mv "$working_dir/etc/locale.conf" "$working_dir/etc/locale.conf.bak" mv "$working_dir/etc/locale.conf" "$working_dir/etc/locale.conf.bak"

View file

@ -10,9 +10,9 @@
# GNU General Public License for more details. # GNU General Public License for more details.
copy_overlay(){ copy_overlay(){
if [[ -e $1 ]];then if [[ -e $1 ]]; then
msg2 "Copying [%s] ..." "${1##*/}" msg2 "Copying [%s] ..." "${1##*/}"
if [[ -L $1 ]];then if [[ -L $1 ]]; then
cp -a --no-preserve=ownership $1/* $2 cp -a --no-preserve=ownership $1/* $2
else else
cp -LR $1/* $2 cp -LR $1/* $2
@ -21,7 +21,7 @@ copy_overlay(){
} }
add_svc_rc(){ add_svc_rc(){
if [[ -f $1/etc/init.d/$2 ]];then if [[ -f $1/etc/init.d/$2 ]]; then
msg2 "Setting %s ..." "$2" msg2 "Setting %s ..." "$2"
chroot $1 rc-update add $2 default &>/dev/null chroot $1 rc-update add $2 default &>/dev/null
fi fi
@ -29,14 +29,14 @@ add_svc_rc(){
add_svc_sd(){ add_svc_sd(){
if [[ -f $1/etc/systemd/system/$2.service ]] || \ if [[ -f $1/etc/systemd/system/$2.service ]] || \
[[ -f $1/usr/lib/systemd/system/$2.service ]];then [[ -f $1/usr/lib/systemd/system/$2.service ]]; then
msg2 "Setting %s ..." "$2" msg2 "Setting %s ..." "$2"
chroot $1 systemctl enable $2 &>/dev/null chroot $1 systemctl enable $2 &>/dev/null
fi fi
} }
set_xdm(){ set_xdm(){
if [[ -f $1/etc/conf.d/xdm ]];then if [[ -f $1/etc/conf.d/xdm ]]; then
local conf='DISPLAYMANAGER="'${displaymanager}'"' local conf='DISPLAYMANAGER="'${displaymanager}'"'
sed -i -e "s|^.*DISPLAYMANAGER=.*|${conf}|" $1/etc/conf.d/xdm sed -i -e "s|^.*DISPLAYMANAGER=.*|${conf}|" $1/etc/conf.d/xdm
fi fi
@ -148,7 +148,7 @@ write_live_session_conf(){
echo '' >> ${conf} echo '' >> ${conf}
echo '# live group membership' >> ${conf} echo '# live group membership' >> ${conf}
echo "addgroups='${addgroups}'" >> ${conf} echo "addgroups='${addgroups}'" >> ${conf}
if [[ -n ${smb_workgroup} ]];then if [[ -n ${smb_workgroup} ]]; then
echo '' >> ${conf} echo '' >> ${conf}
echo '# samba workgroup' >> ${conf} echo '# samba workgroup' >> ${conf}
echo "smb_workgroup=${smb_workgroup}" >> ${conf} echo "smb_workgroup=${smb_workgroup}" >> ${conf}
@ -199,7 +199,7 @@ configure_thus(){
echo "INITRAMFS = \"$(echo ${default_image} | sed s'|/boot/||')\"" >> "$conf" echo "INITRAMFS = \"$(echo ${default_image} | sed s'|/boot/||')\"" >> "$conf"
echo "FALLBACK = \"$(echo ${fallback_image} | sed s'|/boot/||')\"" >> "$conf" echo "FALLBACK = \"$(echo ${fallback_image} | sed s'|/boot/||')\"" >> "$conf"
if [[ -f $1/usr/share/applications/thus.desktop && -f $1/usr/bin/kdesu ]];then if [[ -f $1/usr/share/applications/thus.desktop && -f $1/usr/bin/kdesu ]]; then
sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/thus.desktop sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/thus.desktop
fi fi
} }
@ -256,7 +256,7 @@ chroot_clean(){
for image in "$1"/*fs; do for image in "$1"/*fs; do
[[ -d ${image} ]] || continue [[ -d ${image} ]] || continue
local name=${image##*/} local name=${image##*/}
if [[ $name != "mhwdfs" ]];then if [[ $name != "mhwdfs" ]]; then
msg2 "Deleting chroot [%s] (%s) ..." "$name" "${1##*/}" msg2 "Deleting chroot [%s] (%s) ..." "$name" "${1##*/}"
lock 9 "${image}.lock" "Locking chroot '${image}'" lock 9 "${image}.lock" "Locking chroot '${image}'"
if [[ "$(stat -f -c %T "${image}")" == btrfs ]]; then if [[ "$(stat -f -c %T "${image}")" == btrfs ]]; then
@ -273,20 +273,20 @@ clean_up_image(){
msg2 "Cleaning [%s]" "${1##*/}" msg2 "Cleaning [%s]" "${1##*/}"
local path local path
if [[ ${1##*/} == 'mhwdfs' ]];then if [[ ${1##*/} == 'mhwdfs' ]]; then
path=$1/var path=$1/var
if [[ -d $path/lib/mhwd ]];then if [[ -d $path/lib/mhwd ]]; then
mv $path/lib/mhwd $1 &> /dev/null mv $path/lib/mhwd $1 &> /dev/null
fi fi
if [[ -d $path ]];then if [[ -d $path ]]; then
find "$path" -mindepth 0 -delete &> /dev/null find "$path" -mindepth 0 -delete &> /dev/null
fi fi
if [[ -d $1/mhwd ]];then if [[ -d $1/mhwd ]]; then
mkdir -p $path/lib mkdir -p $path/lib
mv $1/mhwd $path/lib &> /dev/null mv $1/mhwd $path/lib &> /dev/null
fi fi
path=$1/etc path=$1/etc
if [[ -d $path ]];then if [[ -d $path ]]; then
find "$path" -mindepth 0 -delete &> /dev/null find "$path" -mindepth 0 -delete &> /dev/null
fi fi
else else
@ -297,7 +297,7 @@ clean_up_image(){
find "$path" -name 'initramfs*.img' -delete &> /dev/null find "$path" -name 'initramfs*.img' -delete &> /dev/null
fi fi
path=$1/var/lib/pacman/sync path=$1/var/lib/pacman/sync
if [[ -d $path ]];then if [[ -d $path ]]; then
find "$path" -type f -delete &> /dev/null find "$path" -type f -delete &> /dev/null
fi fi
path=$1/var/cache/pacman/pkg path=$1/var/cache/pacman/pkg
@ -309,11 +309,11 @@ clean_up_image(){
find "$path" -type f -delete &> /dev/null find "$path" -type f -delete &> /dev/null
fi fi
path=$1/var/tmp path=$1/var/tmp
if [[ -d $path ]];then if [[ -d $path ]]; then
find "$path" -mindepth 1 -delete &> /dev/null find "$path" -mindepth 1 -delete &> /dev/null
fi fi
path=$1/tmp path=$1/tmp
if [[ -d $path ]];then if [[ -d $path ]]; then
find "$path" -mindepth 1 -delete &> /dev/null find "$path" -mindepth 1 -delete &> /dev/null
fi fi
fi fi

View file

@ -21,7 +21,7 @@ mount_img() {
} }
umount_img() { umount_img() {
if [[ -n ${IMG_ACTIVE_MOUNTS[@]} ]];then if [[ -n ${IMG_ACTIVE_MOUNTS[@]} ]]; then
info "umount: [%s]" "${IMG_ACTIVE_MOUNTS[@]}" info "umount: [%s]" "${IMG_ACTIVE_MOUNTS[@]}"
umount "${IMG_ACTIVE_MOUNTS[@]}" umount "${IMG_ACTIVE_MOUNTS[@]}"
unset IMG_ACTIVE_MOUNTS unset IMG_ACTIVE_MOUNTS
@ -60,7 +60,7 @@ mount_fs_net(){
} }
umount_fs(){ umount_fs(){
if [[ -n ${FS_ACTIVE_MOUNTS[@]} ]];then if [[ -n ${FS_ACTIVE_MOUNTS[@]} ]]; then
info "overlayfs umount: [%s]" "${FS_ACTIVE_MOUNTS[@]}" info "overlayfs umount: [%s]" "${FS_ACTIVE_MOUNTS[@]}"
umount "${FS_ACTIVE_MOUNTS[@]}" umount "${FS_ACTIVE_MOUNTS[@]}"
unset FS_ACTIVE_MOUNTS unset FS_ACTIVE_MOUNTS

View file

@ -49,7 +49,7 @@ run_safe() {
restoretrap=$(trap -p ERR) restoretrap=$(trap -p ERR)
trap 'error_function $func' ERR trap 'error_function $func' ERR
if ${verbose};then if ${verbose}; then
run_log "$func" run_log "$func"
else else
"$func" "$func"
@ -110,7 +110,7 @@ make_sfs() {
fi fi
fi fi
if ${persist};then if ${persist}; then
local size=32G local size=32G
local mnt="${mnt_dir}/${name}" local mnt="${mnt_dir}/${name}"
msg2 "Creating ext4 image of %s ..." "${size}" msg2 "Creating ext4 image of %s ..." "${size}"
@ -129,7 +129,7 @@ make_sfs() {
msg2 "Creating SquashFS image, this may take some time..." msg2 "Creating SquashFS image, this may take some time..."
local used_kernel=${kernel:5:1} mksfs_args=() local used_kernel=${kernel:5:1} mksfs_args=()
if ${persist};then if ${persist}; then
mksfs_args+=(${work_dir}/${name}.img) mksfs_args+=(${work_dir}/${name}.img)
else else
mksfs_args+=(${src}) mksfs_args+=(${src})
@ -144,7 +144,7 @@ make_sfs() {
else else
mksfs_args+=(-comp ${comp} ${highcomp}) mksfs_args+=(-comp ${comp} ${highcomp})
fi fi
if ${verbose};then if ${verbose}; then
mksquashfs "${mksfs_args[@]}" >/dev/null mksquashfs "${mksfs_args[@]}" >/dev/null
else else
mksquashfs "${mksfs_args[@]}" mksquashfs "${mksfs_args[@]}"
@ -152,7 +152,7 @@ make_sfs() {
make_checksum "${dest}" "${name}" make_checksum "${dest}" "${name}"
${persist} && rm "${src}.img" ${persist} && rm "${src}.img"
if [[ -n ${gpgkey} ]];then if [[ -n ${gpgkey} ]]; then
make_sig "${dest}" "${name}" make_sig "${dest}" "${name}"
fi fi
@ -216,7 +216,7 @@ make_iso() {
gen_iso_fn(){ gen_iso_fn(){
local vars=() name local vars=() name
vars+=("${iso_name}") vars+=("${iso_name}")
if ! ${chrootcfg};then if ! ${chrootcfg}; then
[[ -n ${profile} ]] && vars+=("${profile}") [[ -n ${profile} ]] && vars+=("${profile}")
fi fi
[[ ${initsys} == 'openrc' ]] && vars+=("${initsys}") [[ ${initsys} == 'openrc' ]] && vars+=("${initsys}")
@ -413,20 +413,20 @@ make_grub(){
check_requirements(){ check_requirements(){
[[ -f ${run_dir}/repo_info ]] || die "%s is not a valid iso profiles directory!" "${run_dir}" [[ -f ${run_dir}/repo_info ]] || die "%s is not a valid iso profiles directory!" "${run_dir}"
if ! $(is_valid_arch_iso ${target_arch});then if ! $(is_valid_arch_iso ${target_arch}); then
die "%s is not a valid arch!" "${target_arch}" die "%s is not a valid arch!" "${target_arch}"
fi fi
if ! $(is_valid_branch ${target_branch});then if ! $(is_valid_branch ${target_branch}); then
die "%s is not a valid branch!" "${target_branch}" die "%s is not a valid branch!" "${target_branch}"
fi fi
if ! is_valid_init "${initsys}";then if ! is_valid_init "${initsys}"; then
die "%s is not a valid init system!" "${initsys}" die "%s is not a valid init system!" "${initsys}"
fi fi
local iso_kernel=${kernel:5:1} host_kernel=$(uname -r) local iso_kernel=${kernel:5:1} host_kernel=$(uname -r)
if [[ ${iso_kernel} < "4" ]] \ if [[ ${iso_kernel} < "4" ]] \
|| [[ ${host_kernel%%*.} < "4" ]];then || [[ ${host_kernel%%*.} < "4" ]]; then
die "The host and iso kernels must be version>=4.0!" die "The host and iso kernels must be version>=4.0!"
fi fi
} }
@ -471,7 +471,7 @@ archive_logs(){
make_profile(){ make_profile(){
msg "Start building [%s]" "${profile}" msg "Start building [%s]" "${profile}"
if ${clean_first};then if ${clean_first}; then
chroot_clean "${chroots_iso}/${profile}/${target_arch}" chroot_clean "${chroots_iso}/${profile}/${target_arch}"
local unused_arch='' local unused_arch=''
@ -479,7 +479,7 @@ make_profile(){
i686) unused_arch='x86_64' ;; i686) unused_arch='x86_64' ;;
x86_64) unused_arch='i686' ;; x86_64) unused_arch='i686' ;;
esac esac
if [[ -d "${chroots_iso}/${profile}/${unused_arch}" ]];then if [[ -d "${chroots_iso}/${profile}/${unused_arch}" ]]; then
chroot_clean "${chroots_iso}/${profile}/${unused_arch}" chroot_clean "${chroots_iso}/${profile}/${unused_arch}"
fi fi
clean_iso_root "${iso_root}" clean_iso_root "${iso_root}"
@ -509,7 +509,7 @@ make_profile(){
get_pacman_conf(){ get_pacman_conf(){
local user_conf=${profile_dir}/user-repos.conf pac_arch='default' conf local user_conf=${profile_dir}/user-repos.conf pac_arch='default' conf
[[ "${target_arch}" == 'x86_64' ]] && pac_arch='multilib' [[ "${target_arch}" == 'x86_64' ]] && pac_arch='multilib'
if [[ -f ${user_conf} ]];then if [[ -f ${user_conf} ]]; then
info "detected: %s" "user-repos.conf" info "detected: %s" "user-repos.conf"
check_user_repos_conf "${user_conf}" check_user_repos_conf "${user_conf}"
conf=${tmp_dir}/custom-pacman.conf conf=${tmp_dir}/custom-pacman.conf

View file

@ -46,7 +46,7 @@ chroot_part_mount() {
select_os(){ select_os(){
local os_list=( $(detect) ) count=${#os_list[@]} local os_list=( $(detect) ) count=${#os_list[@]}
if [[ ${count} > 1 ]];then if [[ ${count} > 1 ]]; then
msg "Detected systems:" msg "Detected systems:"
local i=0 local i=0
for os in ${os_list[@]};do for os in ${os_list[@]};do
@ -66,7 +66,7 @@ select_os(){
type=$os_str type=$os_str
root=${os_str%%:*} root=${os_str%%:*}
type=${type##*:} type=${type##*:}
if [[ "${type##*:}" == 'linux' ]];then if [[ "${type##*:}" == 'linux' ]]; then
msg "Mounting (%s) [%s]" "$(get_os_name $os_str)" "$root" msg "Mounting (%s) [%s]" "$(get_os_name $os_str)" "$root"
chroot_mount_partitions "$1" "$root" chroot_mount_partitions "$1" "$root"
else else
@ -99,7 +99,7 @@ chroot_mount_partitions(){
[[ ${chroot_arch} == x86-64 ]] && chroot_arch=${chroot_arch/-/_} [[ ${chroot_arch} == x86-64 ]] && chroot_arch=${chroot_arch/-/_}
case ${target_arch} in case ${target_arch} in
i686) i686)
if [[ ${chroot_arch} == x86_64 ]];then if [[ ${chroot_arch} == x86_64 ]]; then
die "You can't chroot from %s host into %s!" "${target_arch}" "${chroot_arch}" die "You can't chroot from %s host into %s!" "${target_arch}" "${chroot_arch}"
fi fi
;; ;;

View file

@ -95,7 +95,7 @@ die() {
} }
import(){ import(){
if [[ -r $1 ]];then if [[ -r $1 ]]; then
source $1 source $1
else else
die "Could not import $1" die "Could not import $1"

View file

@ -38,13 +38,13 @@ get_makepkg_conf(){
# $1: target_arch # $1: target_arch
prepare_conf(){ prepare_conf(){
if ! is_valid_arch_pkg "$1";then if ! is_valid_arch_pkg "$1"; then
die "%s is not a valid arch!" "$1" die "%s is not a valid arch!" "$1"
fi fi
local pac_arch='default' local pac_arch='default'
if [[ "$1" == 'multilib' ]];then if [[ "$1" == 'multilib' ]]; then
pac_arch='multilib' pac_arch='multilib'
is_multilib=true is_multilib=true
fi fi
@ -94,10 +94,10 @@ load_group(){
} }
init_base_devel(){ init_base_devel(){
if ${udev_root};then if ${udev_root}; then
base_packages=( "$(load_group)" ) base_packages=( "$(load_group)" )
else else
if ${is_multilib};then if ${is_multilib}; then
base_packages=('base-devel' 'multilib-devel') base_packages=('base-devel' 'multilib-devel')
else else
base_packages=('base-devel') base_packages=('base-devel')
@ -143,7 +143,7 @@ clean_up(){
msg "Cleaning up ..." msg "Cleaning up ..."
msg2 "Cleaning [%s]" "${pkg_dir}" msg2 "Cleaning [%s]" "${pkg_dir}"
find ${pkg_dir} -maxdepth 1 -name "*.*" -delete #&> /dev/null find ${pkg_dir} -maxdepth 1 -name "*.*" -delete #&> /dev/null
if [[ -z $SRCDEST ]];then if [[ -z $SRCDEST ]]; then
msg2 "Cleaning [source files]" msg2 "Cleaning [source files]"
find $PWD -maxdepth 1 -name '*.?z?' -delete #&> /dev/null find $PWD -maxdepth 1 -name '*.?z?' -delete #&> /dev/null
fi fi
@ -168,7 +168,7 @@ archive_logs(){
local archive name="$1" ext=log.tar.xz ver src=${tmp_dir}/archives.list target='.' local archive name="$1" ext=log.tar.xz ver src=${tmp_dir}/archives.list target='.'
ver=$(get_full_version "$name") ver=$(get_full_version "$name")
archive="${name}-${ver}-${target_arch}" archive="${name}-${ver}-${target_arch}"
if [[ -n $LOGDEST ]];then if [[ -n $LOGDEST ]]; then
target=$LOGDEST target=$LOGDEST
find $target -maxdepth 1 -name "$archive*.log" -printf "%f\n" > $src find $target -maxdepth 1 -name "$archive*.log" -printf "%f\n" > $src
else else

View file

@ -38,7 +38,7 @@ clone_tree(){
sync_tree_manjaro(){ sync_tree_manjaro(){
cd ${tree_dir} cd ${tree_dir}
for repo in ${repo_tree[@]};do for repo in ${repo_tree[@]};do
if [[ -d packages-${repo} ]];then if [[ -d packages-${repo} ]]; then
cd packages-${repo} cd packages-${repo}
sync_tree "${repo}" sync_tree "${repo}"
cd .. cd ..
@ -53,7 +53,7 @@ sync_tree_abs(){
local repo_tree_abs=('packages' 'community') local repo_tree_abs=('packages' 'community')
cd ${tree_dir_abs} cd ${tree_dir_abs}
for repo in ${repo_tree_abs[@]};do for repo in ${repo_tree_abs[@]};do
if [[ -d ${repo} ]];then if [[ -d ${repo} ]]; then
cd ${repo} cd ${repo}
sync_tree "${repo}" sync_tree "${repo}"
cd .. cd ..

View file

@ -72,7 +72,7 @@ write_servicescfg_conf(){
echo " - name: $s" >> "$conf" echo " - name: $s" >> "$conf"
echo ' runlevel: default' >> "$conf" echo ' runlevel: default' >> "$conf"
done done
if [[ -n ${disable_openrc[@]} ]];then if [[ -n ${disable_openrc[@]} ]]; then
echo ' disabled:' >> "$conf" echo ' disabled:' >> "$conf"
for s in ${disable_openrc[@]};do for s in ${disable_openrc[@]};do
echo " - name: $s" >> "$conf" echo " - name: $s" >> "$conf"
@ -192,7 +192,7 @@ write_welcome_conf(){
echo " - storage" >> "$conf" echo " - storage" >> "$conf"
echo " - ram" >> "$conf" echo " - ram" >> "$conf"
echo " - root" >> "$conf" echo " - root" >> "$conf"
if ${netinstall};then if ${netinstall}; then
echo " - internet" >> "$conf" echo " - internet" >> "$conf"
fi fi
} }
@ -231,7 +231,7 @@ write_postcfg_conf(){
echo "keyrings:" >> "$conf" echo "keyrings:" >> "$conf"
echo " - archlinux" >> "$conf" echo " - archlinux" >> "$conf"
echo " - manjaro" >> "$conf" echo " - manjaro" >> "$conf"
if [[ -n ${smb_workgroup} ]];then if [[ -n ${smb_workgroup} ]]; then
echo "" >> "$conf" echo "" >> "$conf"
echo "samba:" >> "$conf" echo "samba:" >> "$conf"
echo " - workgroup: ${smb_workgroup}" >> "$conf" echo " - workgroup: ${smb_workgroup}" >> "$conf"
@ -240,7 +240,7 @@ write_postcfg_conf(){
get_yaml(){ get_yaml(){
local args=() yaml local args=() yaml
if ${chrootcfg};then if ${chrootcfg}; then
args+=("${profile}/chrootcfg") args+=("${profile}/chrootcfg")
else else
args+=("${profile}/packages") args+=("${profile}/packages")
@ -264,7 +264,7 @@ write_locale_conf(){
msg2 "Writing %s ..." "${conf##*/}" msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf" echo "---" > "$conf"
echo "localeGenPath: /etc/locale.gen" >> "$conf" echo "localeGenPath: /etc/locale.gen" >> "$conf"
if ${geoip};then if ${geoip}; then
echo "geoipUrl: https://geoip.tools/v1" >> "$conf" echo "geoipUrl: https://geoip.tools/v1" >> "$conf"
echo "geoipStyle: legacy" >> "$conf" echo "geoipStyle: legacy" >> "$conf"
else else
@ -282,26 +282,26 @@ write_settings_conf(){
echo "sequence:" >> "$conf" echo "sequence:" >> "$conf"
echo " - show:" >> "$conf" echo " - show:" >> "$conf"
echo " - welcome" >> "$conf" && write_welcome_conf echo " - welcome" >> "$conf" && write_welcome_conf
if ${oem_used};then if ${oem_used}; then
msg2 "Skipping to show locale and keyboard modules." msg2 "Skipping to show locale and keyboard modules."
else else
echo " - locale" >> "$conf" && write_locale_conf echo " - locale" >> "$conf" && write_locale_conf
echo " - keyboard" >> "$conf" echo " - keyboard" >> "$conf"
fi fi
echo " - partition" >> "$conf" echo " - partition" >> "$conf"
if ${oem_used};then if ${oem_used}; then
msg2 "Skipping to show users module." msg2 "Skipping to show users module."
else else
echo " - users" >> "$conf" && write_users_conf echo " - users" >> "$conf" && write_users_conf
fi fi
if ${netinstall};then if ${netinstall}; then
echo " - netinstall" >> "$conf" && write_netinstall_conf echo " - netinstall" >> "$conf" && write_netinstall_conf
fi fi
echo " - summary" >> "$conf" echo " - summary" >> "$conf"
echo " - exec:" >> "$conf" echo " - exec:" >> "$conf"
echo " - partition" >> "$conf" echo " - partition" >> "$conf"
echo " - mount" >> "$conf" echo " - mount" >> "$conf"
if ${netinstall};then if ${netinstall}; then
if ${chrootcfg}; then if ${chrootcfg}; then
echo " - chrootcfg" >> "$conf" echo " - chrootcfg" >> "$conf"
echo " - networkcfg" >> "$conf" echo " - networkcfg" >> "$conf"
@ -316,7 +316,7 @@ write_settings_conf(){
fi fi
echo " - machineid" >> "$conf" && write_machineid_conf echo " - machineid" >> "$conf" && write_machineid_conf
echo " - fstab" >> "$conf" echo " - fstab" >> "$conf"
if ${oem_used};then if ${oem_used}; then
msg2 "Skipping to set locale, keyboard and localecfg modules." msg2 "Skipping to set locale, keyboard and localecfg modules."
else else
echo " - locale" >> "$conf" echo " - locale" >> "$conf"
@ -327,14 +327,14 @@ write_settings_conf(){
echo " - luksbootkeyfile" >> "$conf" echo " - luksbootkeyfile" >> "$conf"
echo " - initcpiocfg" >> "$conf" echo " - initcpiocfg" >> "$conf"
echo " - initcpio" >> "$conf" && write_initcpio_conf echo " - initcpio" >> "$conf" && write_initcpio_conf
if ${oem_used};then if ${oem_used}; then
msg2 "Skipping to set users module." msg2 "Skipping to set users module."
echo " - oemuser" >> "$conf" echo " - oemuser" >> "$conf"
else else
echo " - users" >> "$conf" echo " - users" >> "$conf"
fi fi
echo " - displaymanager" >> "$conf" && write_displaymanager_conf echo " - displaymanager" >> "$conf" && write_displaymanager_conf
if ${mhwd_used};then if ${mhwd_used}; then
echo " - mhwdcfg" >> "$conf" && write_mhwdcfg_conf echo " - mhwdcfg" >> "$conf" && write_mhwdcfg_conf
else else
msg2 "Skipping to set mhwdcfg module." msg2 "Skipping to set mhwdcfg module."
@ -346,7 +346,7 @@ write_settings_conf(){
esac esac
echo " - grubcfg" >> "$conf" echo " - grubcfg" >> "$conf"
echo " - bootloader" >> "$conf" && write_bootloader_conf echo " - bootloader" >> "$conf" && write_bootloader_conf
if ${oem_used};then if ${oem_used}; then
msg2 "Skipping to set postcfg module." msg2 "Skipping to set postcfg module."
else else
echo " - postcfg" >> "$conf" && write_postcfg_conf echo " - postcfg" >> "$conf" && write_postcfg_conf
@ -357,7 +357,7 @@ write_settings_conf(){
echo '' >> "$conf" echo '' >> "$conf"
echo "branding: ${iso_name}" >> "$conf" echo "branding: ${iso_name}" >> "$conf"
echo '' >> "$conf" echo '' >> "$conf"
if ${oem_used};then if ${oem_used}; then
echo "prompt-install: false" >> "$conf" echo "prompt-install: false" >> "$conf"
else else
echo "prompt-install: true" >> "$conf" echo "prompt-install: true" >> "$conf"