bootstrap: Generate final install.sh during build
This solves problem where bootstrap was simply copying ./install.sh.template into ./install.sh. Then first call of ./install.sh was calling ./koch install that was running extra compilation and overwriting ./install.sh with new content. This was overcomplicated, and also caused first `sudo ./install.sh DIR` to run compilation under root account, leaving root owned files in working directory. Now bootstrap calls `./koch geninstall` that just generates ./install.sh without calling it. This ./install.sh is FINAL one, and running it does not generate any files aside passed DIR. This makes whole process simpler.
This commit is contained in:
parent
6655537c66
commit
6cc9853935
2 changed files with 5 additions and 11 deletions
|
|
@ -12,8 +12,11 @@ cd ".."
|
||||||
|
|
||||||
./bin/nim c koch
|
./bin/nim c koch
|
||||||
./koch boot -d:release
|
./koch boot -d:release
|
||||||
|
./koch geninstall
|
||||||
|
|
||||||
cp -f install.sh.template install.sh
|
set +x
|
||||||
chmod +x install.sh
|
|
||||||
|
echo
|
||||||
|
echo 'Install Nim using "./install.sh <dir>" or "sudo ./install.sh <dir>".'
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
|
|
||||||
if [ "$1" != "" ]; then
|
|
||||||
exec ./koch install "$1"
|
|
||||||
else
|
|
||||||
exec ./koch install
|
|
||||||
fi
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue