Remove bash profile during installation script
This commit is contained in:
parent
b61602cd68
commit
b1ddb0de48
1 changed files with 26 additions and 17 deletions
|
@ -77,9 +77,16 @@ function runSetup
|
|||
and runHook --force autologin "Please set up a function `autologin` for setting up autologin for the `root` user"
|
||||
|
||||
and begin
|
||||
set -l profile "/root/.bash_profile"
|
||||
|
||||
begin
|
||||
set -l profile (string escape "$profile")
|
||||
set -l tmp (string escape "$profile""_")
|
||||
set -l script (string escape (getCloneFile (getInstallerScript)))
|
||||
|
||||
wrapScript (
|
||||
printf "%s\n" \
|
||||
"mv $profile $tmp" \
|
||||
(wrapScript (
|
||||
string join " " \
|
||||
(begin
|
||||
for var in \
|
||||
|
@ -93,9 +100,11 @@ function runSetup
|
|||
echo "$var=$(string escape "$$var")"
|
||||
end
|
||||
end) \
|
||||
(string escape $script))
|
||||
|
||||
end | runChroot "$mountDir" tee /root/.bash_profile >/dev/null
|
||||
(string escape $script) "&&")) \
|
||||
"rm $tmp ||"
|
||||
"mv $tmp $profile"
|
||||
end | runChroot "$mountDir" tee "$profile" >/dev/null
|
||||
end
|
||||
end
|
||||
|
||||
function actionPostRun
|
||||
|
|
Loading…
Reference in a new issue