Advertisement
uriid1

Build Luvit for aarch64

Apr 18th, 2022
1,409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.97 KB | None | 0 0
  1. #!/bin/sh
  2. set -eu
  3. LUVI_VERSION=${LUVI_VERSION:-2.12.0}
  4. LIT_VERSION=${LIT_VERSION:-3.8.5}
  5. LUVI_ARCH=`uname -s`_`uname -m`
  6. RUN_PATH=$PWD
  7.  
  8. LUVI_URL="https://github.com/luvit/luvi/releases/download/v$LUVI_VERSION/luvi-regular-$LUVI_ARCH"
  9. LIT_URL="https://lit.luvit.io/packages/luvit/lit/v$LIT_VERSION.zip"
  10.  
  11. # Get luvi
  12. if [ "$LUVI_ARCH" != "Linux_aarch64" ]; then
  13.     echo "Downloading $LUVI_URL to luvi"
  14.     curl -L -f -o luvi $LUVI_URL
  15.     chmod +x luvi
  16. else
  17.     echo "Downloading luvi repo and build"
  18.     git clone --recursive https://github.com/luvit/luvi.git
  19.     mv luvi $RUN_PATH/luvi_source
  20.     cd luvi_source
  21.     make regular
  22.     make
  23.     mv $PWD/build/luvi $RUN_PATH/luvi
  24.     cd $RUN_PATH
  25. fi
  26.  
  27. # Get lit
  28. echo "Downloading $LIT_URL to lit.zip"
  29. curl -L -f -o lit.zip $LIT_URL
  30.  
  31. # Create lit using lit
  32. ./luvi lit.zip -- make lit.zip lit luvi
  33.  
  34. # Create luvit using lit
  35. ./lit make lit://luvit/luvit luvit luvi
  36.  
  37. # Cleanup
  38. rm -f lit.zip
  39. rm -rf $RUN_PATH/luvi_source
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement