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 | arch-chroot "$mountDir" tee "$file" > /dev/null
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function getInstallerScript -S
|
||||||
|
echo "$dir/install.fish"
|
||||||
|
end
|
||||||
|
|
||||||
source "$dir/../../Common/OS/setup.fish"
|
source "$dir/../../Common/OS/setup.fish"
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,6 +10,12 @@ begin
|
||||||
set -l PROJECT_CLONE_ROOT "/opt/$(basename "$projectName")"
|
set -l PROJECT_CLONE_ROOT "/opt/$(basename "$projectName")"
|
||||||
set -l script (mktemp)
|
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"
|
getConfig valhalla.partition.script > "$script"
|
||||||
bash "$script"
|
bash "$script"
|
||||||
and source "$dir/../../copy-repo.fish" "$mountDir$PROJECT_CLONE_ROOT"
|
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
|
end | chroot "$mountDir" tee "/etc/sudoers.d/PortValhalla" > /dev/null
|
||||||
|
|
||||||
and runHook autologin || true
|
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 "Setup finished!"
|
||||||
and echo "Please reboot your machine"
|
and echo "Please reboot your machine"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue