diff --git a/README b/README index 2986119..e2899f0 100644 --- a/README +++ b/README @@ -21,7 +21,7 @@ You will need to run the corresponding script for your system. $ elif-setup live If you are using another host: - $ elif-setup host + $ elif-setup tar elif-setup will set the system up to install Everest. diff --git a/elif-setup b/elif-setup new file mode 100755 index 0000000..4a24f25 --- /dev/null +++ b/elif-setup @@ -0,0 +1,47 @@ +#!/bin/sh + +case $1 in + help) + printf "usage: elif-setup [live] [tar] [help]\n" + exit 0 + ;; + live) + printf "[ i ] Setting up ELIF for target 'live'\n" + printf "[ i ] Parsing setup.conf...\n" + source $(pwd)/setup.conf + printf "[ i ] Mounting partitions...\n" + mount $EVEREST_DISK $EVEREST + printf "[ i ] Downloading rootfs image...\n" + cd $EVEREST + wget $EVEREST_ROOTFS_IMG + printf "[ i ] Exporting variables...\n" + echo EVEREST=$EVEREST >> /etc/profile + echo EVEREST_DISK=$EVEREST_DISK >> /etc/profile + echo EVEREST_ROOTFS_IMG=$EVEREST_ROOTFS_IMG >> /etc/profile + source /etc/profile + printf "[ \xE2\x9C\x93 ] Finished setup.\n" + ;; + tar) + printf "[ i ] Setting up ELIF for target 'tar'\n" + printf "[ i ] Parsing setup.conf...\n" + source $(pwd)/setup.conf + printf "[ i ] Creating temporary build user...\n" + useradd everest-temp + printf "[ i ] Creating $EVEREST...\n" + mkdir $EVEREST + chown -Rv everest-temp $EVEREST + printf "[ i ] Mounting partitions...\n" + mount $EVEREST_DISK $EVEREST + printf "[ i ] Downloading rootfs image...\n" + cd $EVEREST + wget $EVEREST_ROOTFS_IMG + printf "[ i ] Exporting variables...\n" + echo EVEREST=$EVEREST >> /etc/profile + echo EVEREST_DISK=$EVEREST_DISK >> /etc/profile + echo EVEREST_ROOTFS_IMG=$EVEREST_ROOTFS_IMG >> /etc/profile + source /etc/profile + printf "[ \xE2\x9C\x93 ] Finished setup.\n" + ;; + *) + printf "[ X ] Option '$1' not found\n" +esac diff --git a/setup.conf b/setup.conf new file mode 100644 index 0000000..3e55dc1 --- /dev/null +++ b/setup.conf @@ -0,0 +1,12 @@ +#!/bin/sh + +# The root partition Everest will be installed to +export EVEREST_DISK="/dev/sdX" + +# The directory to conduct the installation +# Live USB users should NOT change this +export EVEREST="/mnt/everest" + +# The Everest rootfs image to use +# This should be a download link +export EVEREST_ROOTFS_IMG="https://git.everestlinux.org/EverestLinux/everest/raw/branch/main/releases/everestlinux-0.1.0-rc.1-master.tar.xz"