Allow direct execution of the installation
This commit is contained in:
parent
fcc965d6c6
commit
0902465e1b
2 changed files with 17 additions and 0 deletions
|
@ -102,5 +102,9 @@ begin
|
|||
end | arch-chroot "$mountDir" tee "$file" > /dev/null
|
||||
end
|
||||
|
||||
function getInstallerScript -S
|
||||
echo "$dir/install.fish"
|
||||
end
|
||||
|
||||
source "$dir/../../Common/OS/setup.fish"
|
||||
end
|
||||
|
|
|
@ -10,6 +10,12 @@ begin
|
|||
set -l PROJECT_CLONE_ROOT "/opt/$(basename "$projectName")"
|
||||
set -l script (mktemp)
|
||||
|
||||
function getCloneFile -S -a path
|
||||
set -l relativeDir (realpath --relative-to "$projectRoot" "$dir")
|
||||
set -l relativePath (realpath --relative-to "$dir" "$path")
|
||||
echo "$PROJECT_CLONE_ROOT/$relativeDir/$relativePath"
|
||||
end
|
||||
|
||||
getConfig valhalla.partition.script > "$script"
|
||||
bash "$script"
|
||||
and source "$dir/../../copy-repo.fish" "$mountDir$PROJECT_CLONE_ROOT"
|
||||
|
@ -35,6 +41,13 @@ begin
|
|||
end | chroot "$mountDir" tee "/etc/sudoers.d/PortValhalla" > /dev/null
|
||||
|
||||
and runHook autologin || true
|
||||
|
||||
and begin
|
||||
printf %s\n \
|
||||
"export CONFIG_MODULE=$(string escape (getCloneFile "$CONFIG_MODULE"))" \
|
||||
(string escape (getCloneFile (getInstallerScript)))
|
||||
end | chroot "$mountDir" tee /root/.bash_profile > /dev/null
|
||||
|
||||
and echo "Setup finished!"
|
||||
and echo "Please reboot your machine"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue