A script to update Gitea
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.
 
 
 

26 lines
1.3 KiB

  1. #!/usr/bin/env ruby
  2. require 'readline'
  3. start_gitea = Readline.readline "Command to start Gitea: ", true
  4. stop_gitea = Readline.readline "Command to stop Gitea: ", true
  5. user = Readline.readline "User with write access to directory containing Gitea binary: ", true
  6. do_as_user = Readline.readline "Command to run as user: ", true
  7. gitea_binary_dir = Readline.readline "Directory containing Gitea binary: ", true
  8. os = Readline.readline 'Operating System (must be one of "darwin", "linux", or "windows-4.0"): ', true
  9. arch = Readline.readline 'CPU Architechture (must be one of "386", "amd64", "arm-5", "arm-6", "mips", "mips64le", or "mipsle"): ', true
  10. f = File::open 'macros.m4', 'w'
  11. f.write <<EOF
  12. dnl -*- mode: m4 -*-
  13. dnl Macro definitions
  14. changequote([, ])dnl
  15. define(start_gitea, [#{start_gitea}])dnl Command to start Gitea
  16. define(stop_gitea, [#{stop_gitea}])dnl Command to stop Gitea
  17. define(user, [#{user}])dnl User with write access to directory containing Gitea binary
  18. define(do_as_user, [#{do_as_user}])dnl Command to run as user
  19. define(gitea_binary_dir, [#{gitea_binary_dir}])dnl Directory containing Gitea binary
  20. define(os, [#{os}])dnl Operating System (must be one of "darwin", "linux", or "windows-4.0")
  21. define(arch, [#{arch}])dnl CPU Architechture (must be one of "386", "amd64", "arm-5", "arm-6", "mips", "mips64le", or "mipsle")
  22. EOF
  23. f.close