diff options
author | V3n3RiX <venerix@rogentos.ro> | 2016-04-17 15:40:10 +0100 |
---|---|---|
committer | V3n3RiX <venerix@rogentos.ro> | 2016-04-17 15:40:10 +0100 |
commit | a4be9a729a445055e6777cf517b2bba04d073094 (patch) | |
tree | 9f18e4d824e45942a1e4c647adb861833a7e027c | |
parent | 791c1b2b7ef03116770f6bc514bc6af9861c7f0f (diff) |
try to move some functions to helper scripts
-rwxr-xr-x | devmode | 13 | ||||
-rwxr-xr-x | libvasile-kogaion | 8 | ||||
-rwxr-xr-x | usermode | 10 | ||||
-rwxr-xr-x | vasile-kogaion | 9 |
4 files changed, 23 insertions, 17 deletions
@@ -1,6 +1,6 @@ #!/usr/bin/env bash -fetch_devmod_portage_tree() { +fetch_devmode_portage_tree() { if [[ ! -d /usr/portage/.git ]] ; then cd /usr/portage && git init > /dev/null 2>&1 git remote add origin git://anongit.gentoo.org/repo/gentoo.git @@ -10,8 +10,17 @@ fetch_devmod_portage_tree() { fi } +set_devmode_portage_tree() { + ln -sf /opt/kogaion-build/conf/intel/portage /etc/portage + ln -sf /etc/portage/make.conf.amd64-devel /etc/portage/make.conf + eselect profile set 1 + env-update + . /etc/profile +} + main() { - fetch_devmod_portage_tree + fetch_devmode_portage_tree + set_devmode_portage_tree } main diff --git a/libvasile-kogaion b/libvasile-kogaion index 47b1510..59baf9c 100755 --- a/libvasile-kogaion +++ b/libvasile-kogaion @@ -95,9 +95,7 @@ chrootbuildsystem () { echo "injecting "$releasename" buildsystem && setting up portage" echo "" sleep 1 - for cmd in "$chrootbuildgit" "$chrootportageconfig" "$chrootmakeconf" "$chrootprofile" "$chrootenvupdate" ; do - chroot "$overlaydir" su - "$chrootuser" -c "$cmd" - done + chroot "$overlaydir" su - "$chrootuser" -c "$chrootbuildgit" } chrootbuild () { @@ -165,9 +163,7 @@ isobuildsystem () { echo "injecting "$releasename" buildsystem && setting up portage" echo "" sleep 1 - for cmd in "$isobuildgit" "$isoportageconfig" "$isomakeconf" "$isoprofile" "$isoenvupdate" ; do - chroot "$isosyncdir" su - "$isouser" -c "$cmd" - done + chroot "$isosyncdir" su - "$isouser" -c "$isobuildgit" } isoramfs () { @@ -15,8 +15,16 @@ fetch_usermode_portage_tree() { fi } +set_usermode_portage_tree () { + ln -sf /opt/kogaion-build/conf/intel/portage /etc/portage + ln -sf /etc/portage/make.conf.amd64-user /etc/portage/make.conf + eselect profile set 1 + env-update + . /etc/profile +} + main() { - fetch_usermod_portage_tree + fetch_usermode_portage_tree } main diff --git a/vasile-kogaion b/vasile-kogaion index 6256913..6f8e5b2 100755 --- a/vasile-kogaion +++ b/vasile-kogaion @@ -25,10 +25,6 @@ export local chrootbuildtarget="emerge -kav "$chroottarget"" export local chrootdevtree="/usr/share/vasile-kogaion/devmode" export local chrootmainoverlay="layman -f -a "$releasename"-"$releasetarget" -o https://gitlab.com/"$releasename"/"$releasename"-"$releasetarget"/raw/master/overlay.xml" export local chrootbuildgit="cd /opt && git clone https://gitlab.com/"$releasename"/"$releasename"-build.git" -export local chrootportageconfig="ln -sf /opt/"$releasename"-build/conf/intel/portage /etc/portage" -export local chrootmakeconf="ln -sf /opt/"$releasename"-build/conf/intel/portage/make.conf.amd64-devel /etc/portage/make.conf" -export local chrootenvupdate="/usr/sbin/env-update && . /etc/profile" -export local chrootprofile="eselect profile set 1" # iso variables @@ -40,14 +36,11 @@ export local isoinstalltarget="emerge -Kav "$isotarget"" export local isousertree="/usr/share/vasile-kogaion/usermode" export local isomainoverlay="layman -f -a "$releasename"-"$releasetarget" -o https://gitlab.com/"$releasename"/"$releasename"-"$releasetarget"/raw/master/overlay.xml" export local isobuildgit="cd /opt && git clone https://gitlab.com/"$releasename"/"$releasename"-build.git" -export local isoportageconfig="ln -sf /opt/"$releasename"-build/conf/intel/portage /etc/portage" -export local isoenvupdate="/usr/sbin/env-update && . /etc/profile" -export local isoprofile="eselect profile set 1" + export local isodracutcmd="dracut -N -a dmsquash-live -a pollcdrom -o systemd -o systemd-initrd -o systemd-networkd -o dracut-systemd --force --kver "$kernelver"" export local isodracutrd="initramfs-"$kernelver".img" export local isoeficmd="grub2-mkimage -d /usr/lib64/grub/x86_64-efi -o bootx64.efi -O x86_64-efi ext2 fat udf btrfs ntfs reiserfs xfs hfsplus lvm ata part_msdos part_gpt part_apple bsd search_fs_uuid normal chain iso9660 configfile help loadenv reboot cat search memdisk tar boot linux chain" export local isomainarch="x86_64" -export local isomakeconf="ln -sf /opt/"$releasename"-build/conf/intel/portage/make.conf.amd64-user /etc/portage/make.conf" export local isorootdir=""$releasename"-"$releasetarget"-"$releaseversion"-"$isomainarchx64"" export local isokernelname="kernel-genkernel-"$isomainarch"-"$kernelver"" export local isostagingdir="/tmp/"$isorootdir"" |