nim.sh 595 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. RETCODE=$(fw_exists ${IROOT}/nim.installed)
  3. [ ! "$RETCODE" == 0 ] || { \
  4. source $IROOT/nim.installed
  5. return 0; }
  6. NIM_VERSION="0.11.2"
  7. fw_get -O https://github.com/nim-lang/Nim/archive/v$NIM_VERSION.tar.gz
  8. fw_untar v$NIM_VERSION.tar.gz
  9. mv Nim-$NIM_VERSION nim
  10. cd nim
  11. git clone git://github.com/nim-lang/csources.git
  12. cd csources
  13. sh build.sh
  14. cd ..
  15. bin/nim c koch
  16. # bootstrapping nim's compiler
  17. ./koch boot -d:release
  18. echo "export NIM_HOME=${IROOT}/nim" > $IROOT/nim.installed
  19. echo -e "export PATH=\$NIM_HOME/bin:\$PATH" >> $IROOT/nim.installed
  20. source $IROOT/nim.installed