mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
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.
23 lines
321 B
Bash
Executable File
23 lines
321 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
set -x
|
|
|
|
if [ ! -e csources/.git ]; then
|
|
git clone --depth 1 git://github.com/nim-lang/csources.git csources
|
|
fi
|
|
|
|
cd "csources"
|
|
sh build.sh
|
|
cd ".."
|
|
|
|
./bin/nim c koch
|
|
./koch boot -d:release
|
|
./koch geninstall
|
|
|
|
set +x
|
|
|
|
echo
|
|
echo 'Install Nim using "./install.sh <dir>" or "sudo ./install.sh <dir>".'
|
|
|
|
exit 0
|