Merge pull request #3400 from nanoant/patch/generate-install.sh-during-bootstrap
Generate install.sh during bootstrap
This commit is contained in:
commit
6bc29ccf4c
3 changed files with 12 additions and 13 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
|
|
||||||
9
koch.nim
9
koch.nim
|
|
@ -41,6 +41,7 @@ Options:
|
||||||
Possible Commands:
|
Possible Commands:
|
||||||
boot [options] bootstraps with given command line options
|
boot [options] bootstraps with given command line options
|
||||||
install [bindir] installs to given directory; Unix only!
|
install [bindir] installs to given directory; Unix only!
|
||||||
|
geninstall generate ./install.sh; Unix only!
|
||||||
clean cleans Nim project; removes generated files
|
clean cleans Nim project; removes generated files
|
||||||
web [options] generates the website and the full documentation
|
web [options] generates the website and the full documentation
|
||||||
website [options] generates only the website
|
website [options] generates only the website
|
||||||
|
|
@ -127,9 +128,12 @@ proc nsis(args: string) =
|
||||||
exec(("tools" / "niminst" / "niminst --var:version=$# --var:mingw=mingw$#" &
|
exec(("tools" / "niminst" / "niminst --var:version=$# --var:mingw=mingw$#" &
|
||||||
" nsis compiler/installer.ini") % [VersionAsString, $(sizeof(pointer)*8)])
|
" nsis compiler/installer.ini") % [VersionAsString, $(sizeof(pointer)*8)])
|
||||||
|
|
||||||
|
proc geninstall(args="") =
|
||||||
|
exec("$# cc -r $# --var:version=$# --var:mingw=none --main:compiler/nim.nim scripts compiler/installer.ini $#" %
|
||||||
|
[findNim(), compileNimInst, VersionAsString, args])
|
||||||
|
|
||||||
proc install(args: string) =
|
proc install(args: string) =
|
||||||
exec("$# cc -r $# --var:version=$# --var:mingw=none --main:compiler/nim.nim scripts compiler/installer.ini" %
|
geninstall()
|
||||||
[findNim(), compileNimInst, VersionAsString])
|
|
||||||
exec("sh ./install.sh $#" % args)
|
exec("sh ./install.sh $#" % args)
|
||||||
|
|
||||||
proc web(args: string) =
|
proc web(args: string) =
|
||||||
|
|
@ -373,6 +377,7 @@ of cmdArgument:
|
||||||
of "zip": zip(op.cmdLineRest)
|
of "zip": zip(op.cmdLineRest)
|
||||||
of "xz": xz(op.cmdLineRest)
|
of "xz": xz(op.cmdLineRest)
|
||||||
of "nsis": nsis(op.cmdLineRest)
|
of "nsis": nsis(op.cmdLineRest)
|
||||||
|
of "geninstall": geninstall(op.cmdLineRest)
|
||||||
of "install": install(op.cmdLineRest)
|
of "install": install(op.cmdLineRest)
|
||||||
of "test", "tests": tests(op.cmdLineRest)
|
of "test", "tests": tests(op.cmdLineRest)
|
||||||
of "update":
|
of "update":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue