diff options
author | V3n3RiX <venerix@rogentos.ro> | 2016-04-20 18:12:24 +0100 |
---|---|---|
committer | V3n3RiX <venerix@rogentos.ro> | 2016-04-20 18:12:24 +0100 |
commit | 7f0f70126a79ee23c2c7eaf2cc07a85e44714f9a (patch) | |
tree | ba88297263d0a0876bc1927c879a5330c2865ceb /kvasile | |
parent | 8fb6dc9a8dc3c44c69f579d649ddd0afb36c4cce (diff) |
vasile-kogaion is a stupid name, change it to kvasile...aka vasile Kogaion edition, or, if you like, KDE edition lol
Diffstat (limited to 'kvasile')
-rwxr-xr-x | kvasile | 84 |
1 files changed, 84 insertions, 0 deletions
@@ -0,0 +1,84 @@ +#!/usr/bin/env bash +# Say Hello to Vasile, a modular script to build Kogaion/Argent Linux packages && ISO images using a clean squashfs + overlayfs chroot +# Main author : Ghiunhan Mamut (aka V3n3RiX) @ RogentOS Development Group +# Dependencies : kernel built with squashfs + overlayfs + loopback support && sys-fs/grub:2 && sys-fs/squashfs-tools && dev-libs/libisoburn && sys-fs/mtools +# + +# generic variables + +export local releasename="kogaion" +export local releasetarget="desktop" +export local releaseversion="3" +export local kernelver="3.14.50-"$releasename"" +export local chrootx64=""$releasename"_"$releaseversion"_core_x64.squashfs" +export local chrootx64md5=""$chrootx64".md5" + +# build variables + +export local rodir="rodir" +export local rwdir="rwdir" +export local workdir="workdir" # only needed for overlayfs on kernel greather than 3.18 +export local overlaydir="overlaydir" +export local chrootuser="root" +export local chroottarget="${@:2}" +export local chrootbuildtarget="emerge -kav "$chroottarget"" +export local chrootdevtree="/usr/share/vasile-kogaion/devmodeset" +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" + +# iso variables + +export local bootcorepath="/tmp/bootcore" +export local bootcorefiles="/tmp/bootcore/cdroot/boot" +export local isouser="root" +export local isotarget="${@:2}" +export local isoinstalltarget="emerge -Kav "$isotarget"" +export local isousertree="/usr/share/vasile-kogaion/usermodeset" +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 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 isorootdir=""$releasename"-"$releasetarget"-"$releaseversion"-"$isomainarch"" +export local isokernelname="kernel-genkernel-"$isomainarch"-"$kernelver"" +export local isostagingdir="/tmp/"$isorootdir"" +export local isosupersquashdir=""$isorootdir"/CDroot" +export local isolivesqfsdir=""$isosupersquashdir"/LiveOS" +export local isoliveosdir=""$isorootdir"/LiveOS" +export local isosyncdir=""$isorootdir"/rootfs" +export local isobootdir=""$isorootdir"/boot/grub" +export local isoefibootdir=""$isorootdir"/efi/boot" +export local dracutrd="initramfs-genkernel-"$isomainarch"-"$kernelver"" +export local dracutcmd="dracut -N -o systemd -o systemd-initrd -o systemd-networkd -o dracut-systemd --force --kver "$kernelver" "/boot/"$dracutrd""" + +source /usr/lib/kvasile/libkvasile + +case $1 in + --buildpkg) source /usr/share/kvasile/buildpkg + ;; + --buildiso) source /usr/share/kvasile/buildiso + ;; + --usermode) source /usr/share/kvasile/modereset + source /usr/share/kvasile/usermodeset + ;; + --devmode) source /usr/share/kvasile/modereset + source /usr/share/kvasile/devmodeset + ;; + --help) echo -e "" + echo -e "Usage: kvasile [options]" + echo -e "" + echo -e "Options:" + echo -e "--buildpkg : build package/target in a clean squashed core" + echo -e "--buildiso : build iso based on clean squashed core + targets" + echo -e "--usermode : switch INSTALLED Kogaion system to usermode (use binary packages from repositories)" + echo -e "--devmode : switch INSTALLED Kogaion system to devmode (use source packages from portage tree )" + echo -e "--help : display this help and exit" + echo -e "" + ;; + *) echo -e "error: no operation specified, use --help for help" + ;; +esac + +exit 0 |