You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

118 lines
1.8 KiB

  1. #!/bin/sh
  2. conffile="`mktemp`"
  3. url="http://lol.zoy.org/builds"
  4. append() {
  5. echo "$*" >> "$conffile"
  6. }
  7. #
  8. # Check for command line
  9. #
  10. if [ "$#" != 2 ]; then
  11. echo "Usage: $0 <username> <password>"
  12. exit 1
  13. fi
  14. #
  15. # Operating system information
  16. #
  17. append "[os]"
  18. append "name = `uname -srvmo`"
  19. append "version = 0"
  20. family="`uname -s | tr A-Z a-z`"
  21. case "$family" in
  22. mingw*) family="windows" ;;
  23. darwin*) family="osx" ;;
  24. esac
  25. append "family = $family"
  26. append "token = $RANDOM"
  27. append ""
  28. #
  29. # Hardware information
  30. #
  31. append "[machine]"
  32. name="`uname -n | tr A-Z a-z`"
  33. case "$name" in
  34. d*e*s*o*v*) name="putois" ;;
  35. esac
  36. append "name = $name"
  37. processor="`uname -m`"
  38. case "$processor" in
  39. x86_64) processor="amd64" ;;
  40. i*86) processor="i386" ;;
  41. esac
  42. # Windows defines a lot of crazy shit,
  43. case "$PROCESSOR_ARCHITECTURE" in
  44. amd64|AMD64) processor="amd64" ;;
  45. x86|X86) processor="i386" ;;
  46. esac
  47. case "$PROCESSOR_ARCHITEW6432" in
  48. amd64|AMD64) processor="amd64" ;;
  49. x86|X86) processor="i386" ;;
  50. esac
  51. append "processor = $processor"
  52. append ""
  53. #
  54. # Authentication information
  55. #
  56. append "[authentication]"
  57. append "username = $1"
  58. append "password = $2"
  59. append ""
  60. #
  61. # Visual Studio configuration
  62. #
  63. # FIXME: we also need to check for the Visual Studio SDK
  64. append "[msvc]"
  65. if [ -n "$VS100COMNTOOLS" ]; then
  66. append "version = 10"
  67. elif [ -n "$VS110COMNTOOLS" ]; then
  68. append "version = 11"
  69. elif [ -n "$VS90COMNTOOLS" ]; then
  70. append "version = 9"
  71. fi
  72. append ""
  73. #
  74. # Xbox development kit
  75. #
  76. append "[xdk]"
  77. if [ -n "$XEDK" ]; then
  78. # FIXME: we don't know how to check the version
  79. append "version = 2.0.20675.0"
  80. fi
  81. append ""
  82. #
  83. # PS3 development kit
  84. #
  85. append "[ps3sdk]"
  86. if [ -n "$SN_PS3_PATH" ]; then
  87. append "version = 410"
  88. fi
  89. append ""
  90. #
  91. # Launch everything
  92. #
  93. while : ; do
  94. bitten-slave "$url" -f "$conffile" --name "$name"
  95. sleep 10
  96. done
  97. rm -f "$conffile"