Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: modules/adblockplus/templates/web/hooks_wrapper.sh.erb

Issue 29733731: #7320 - Introduce helpcenter role (Closed)
Left Patch Set: For comments 5 and 6 Created April 10, 2018, 2:45 a.m.
Right Patch Set: Make documentation right Created April 17, 2018, 8:03 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « modules/adblockplus/manifests/web/static/hook.pp ('k') | modules/adblockplus/templates/web/static.conf.erb » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #!/bin/sh 1 #!/bin/sh
2 # Puppet: <%= @title %> 2 # Puppet: <%= @title %>
3 # This script is a wrapper of accesible hooks, defined via hiera and accessed 3 # This script is a wrapper of accesible hooks, defined via hiera and accessed
4 # via ssh with the ForceCommand option. 4 # via ssh with the ForceCommand option.
5 5
6 usage() 6 usage()
7 { 7 {
8 echo "Avaiable commands are:" 8 echo "Avaiable commands are:"
9 echo "help" 9 echo "help"
10 <% @hooks.keys.each do |key| -%> 10 <% @hooks.keys.each do |key| -%>
11 echo "<%= key %>" 11 echo "<%= key %>"
12 <% end -%> 12 <% end -%>
13 } 13 }
14 14
15 command="$1"; shift 15 command="$1"; shift
16 case "$command" in 16 case "$command" in
17 "help") 17 "help")
18 usage 18 usage
19 ;; 19 ;;
20 <% @hooks.each do |command, values| -%> 20 <% @hooks.each do |command, values| -%>
mathias 2018/04/17 15:57:13 Why the double space here?
f.lopez 2018/04/17 18:02:22 Acknowledged.
21 "<%= command %>") 21 "<%= command %>")
22 <%= scope.function_join([[@wrapper_path, command], "/"]) %> "$@" 22 "<%= File.join(@wrapper_path, command) %>" "$@"
mathias 2018/04/17 15:57:14 Why not use Ruby's very own join method here? Also
f.lopez 2018/04/17 18:02:22 Acknowledged.
23 ;; 23 ;;
24 <% end -%> 24 <% end -%>
25 *) 25 *)
26 echo "Unrecognized command" 26 echo "Unrecognized command"
27 usage 27 usage
28 exit 1 28 exit 1
29 ;; 29 ;;
30 esac 30 esac
31 31
LEFTRIGHT

Powered by Google App Engine
This is Rietveld