Guest User

Untitled

a guest
Feb 15th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. set -e
  4.  
  5. if [[ ! -r "./x.py" ]]; then
  6. echo >&2 "error: not in 'rustc' repository"
  7. exit 1
  8. fi
  9.  
  10. export GCC_FARM_PREBUILD=$'
  11. HOST_PATH="$HOST_PATH"
  12. CONFIG_FILE="${HOST_PATH/#\~/\$HOME}/config.toml"
  13. echo "Updating rustc config file \`\$CONFIG_FILE\`..."
  14. CODEGEN_UNITS=$(( $(nproc) / 2 ))
  15. sed -ibak -E "s/^#? ?(codegen-units) = .+$/\\1 = \$CODEGEN_UNITS/" "\$CONFIG_FILE"
  16. '
  17.  
  18. exec gcc-farm "$@"
Add Comment
Please, Sign In to add comment