forked from mirrored-repos/manjaro-tools
basestrap: clean up code
This commit is contained in:
parent
9c8cca5997
commit
e3cd02acb0
3 changed files with 1 additions and 23 deletions
|
@ -103,8 +103,6 @@ if ! pacman -r "$newroot" -Sy "${pacman_args[@]}"; then
|
||||||
die 'Failed to install packages to new root'
|
die 'Failed to install packages to new root'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set_branch "$newroot" "${branch}"
|
|
||||||
|
|
||||||
if ${copykeyring};then
|
if ${copykeyring};then
|
||||||
copy_keyring "$newroot"
|
copy_keyring "$newroot"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -44,11 +44,6 @@ subvolume_delete_recursive() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
set_branch(){
|
|
||||||
local mnt="$1" branch="$2"
|
|
||||||
sed -e "s|^.*Branch = .*|Branch = $branch|" -i $mnt/etc/pacman-mirrors.conf
|
|
||||||
}
|
|
||||||
|
|
||||||
set_locale(){
|
set_locale(){
|
||||||
local mnt="$1"
|
local mnt="$1"
|
||||||
if [[ ! -f "$mnt/etc/locale.gen.bak" ]] && [[ ! -f "$mnt/etc/locale.conf.bak" ]];then
|
if [[ ! -f "$mnt/etc/locale.gen.bak" ]] && [[ ! -f "$mnt/etc/locale.conf.bak" ]];then
|
||||||
|
|
|
@ -266,13 +266,6 @@ gen_iso_fn(){
|
||||||
echo $name
|
echo $name
|
||||||
}
|
}
|
||||||
|
|
||||||
# reset_pac_conf(){
|
|
||||||
# local fs="$1"
|
|
||||||
# info "Restoring [%s/etc/pacman.conf] ..." "$fs"
|
|
||||||
# -e "s|^.*#CheckSpace|CheckSpace|" \
|
|
||||||
# -i "$fs/etc/pacman.conf"
|
|
||||||
# }
|
|
||||||
|
|
||||||
copy_overlay(){
|
copy_overlay(){
|
||||||
local src="$1" dest="$2"
|
local src="$1" dest="$2"
|
||||||
if [[ -e "$src" ]];then
|
if [[ -e "$src" ]];then
|
||||||
|
@ -293,8 +286,6 @@ make_image_root() {
|
||||||
|
|
||||||
copy_overlay "${root_overlay}" "${rootfs}"
|
copy_overlay "${root_overlay}" "${rootfs}"
|
||||||
|
|
||||||
# reset_pac_conf "${rootfs}"
|
|
||||||
|
|
||||||
configure_lsb "${rootfs}"
|
configure_lsb "${rootfs}"
|
||||||
|
|
||||||
clean_up_image "${rootfs}"
|
clean_up_image "${rootfs}"
|
||||||
|
@ -316,8 +307,6 @@ make_image_desktop() {
|
||||||
|
|
||||||
copy_overlay "${desktop_overlay}" "${desktopfs}"
|
copy_overlay "${desktop_overlay}" "${desktopfs}"
|
||||||
|
|
||||||
# reset_pac_conf "${desktopfs}"
|
|
||||||
|
|
||||||
umount_fs
|
umount_fs
|
||||||
clean_up_image "${desktopfs}"
|
clean_up_image "${desktopfs}"
|
||||||
|
|
||||||
|
@ -340,7 +329,7 @@ make_image_live() {
|
||||||
|
|
||||||
configure_live_image "${livefs}"
|
configure_live_image "${livefs}"
|
||||||
|
|
||||||
# reset_pac_conf "${livefs}"
|
pacman -Qr "${livefs}" > ${iso_dir}/$(gen_iso_fn)-pkgs.txt
|
||||||
|
|
||||||
umount_fs
|
umount_fs
|
||||||
|
|
||||||
|
@ -359,8 +348,6 @@ make_image_mhwd() {
|
||||||
|
|
||||||
mount_fs "${mhwdfs}" "${work_dir}" "${desktop_list}"
|
mount_fs "${mhwdfs}" "${work_dir}" "${desktop_list}"
|
||||||
|
|
||||||
# reset_pac_conf "${mhwdfs}"
|
|
||||||
|
|
||||||
copy_from_cache "${mhwdfs}" "${packages[@]}"
|
copy_from_cache "${mhwdfs}" "${packages[@]}"
|
||||||
|
|
||||||
if [[ -n "${packages_cleanup[@]}" ]]; then
|
if [[ -n "${packages_cleanup[@]}" ]]; then
|
||||||
|
@ -392,8 +379,6 @@ make_image_boot() {
|
||||||
|
|
||||||
mount_fs "${bootfs}" "${work_dir}" "${desktop_list}"
|
mount_fs "${bootfs}" "${work_dir}" "${desktop_list}"
|
||||||
|
|
||||||
pacman -Qr "${bootfs}" > ${iso_dir}/$(gen_iso_fn)-pkgs.txt
|
|
||||||
|
|
||||||
prepare_initcpio "${bootfs}"
|
prepare_initcpio "${bootfs}"
|
||||||
prepare_initramfs "${bootfs}"
|
prepare_initramfs "${bootfs}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue