mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 22:33:49 +00:00
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:
@@ -12,8 +12,11 @@ cd ".."
|
||||
|
||||
./bin/nim c koch
|
||||
./koch boot -d:release
|
||||
./koch geninstall
|
||||
|
||||
cp -f install.sh.template install.sh
|
||||
chmod +x install.sh
|
||||
set +x
|
||||
|
||||
echo
|
||||
echo 'Install Nim using "./install.sh <dir>" or "sudo ./install.sh <dir>".'
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
exec ./koch install "$1"
|
||||
else
|
||||
exec ./koch install
|
||||
fi
|
||||
Reference in New Issue
Block a user