This commit is contained in:
lw-everestlinux 2022-10-25 18:55:37 -04:00
parent 50c07e93c9
commit 084dd83800
3 changed files with 60 additions and 1 deletions

2
README
View File

@ -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.

47
elif-setup Executable file
View File

@ -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

12
setup.conf Normal file
View File

@ -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"