#!/bin/bash ## usage: bash cleanup-Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine.sh vi ## usage: bash cleanup-Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine.sh joe [ -n "$1" ] && EDITOR="$1" if [ -z "$EDITOR" ]; then echo "Please provide parameter 1 (editor). Example: vi, joe" exit 1 fi function edit_at_line() { local f="$1" local l="$2" $EDITOR +$l "$f" } echo Process cleanup for 'Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine' echo Number of lines: 15 echo Examples: 'Array ( [0] => Opening brace should be on the same line as the declaration ) ' echo Press ENTER to begin read edit_at_line 'CRM/Core/I18n/SchemaStructure.php' 190 edit_at_line 'CRM/Core/I18n/SchemaStructure.php' 228 edit_at_line 'CRM/Core/I18n/SchemaStructure_4_2_alpha1.php' 187 edit_at_line 'CRM/Core/I18n/SchemaStructure_4_2_alpha1.php' 229 edit_at_line 'CRM/Core/I18n/SchemaStructure_4_3_1.php' 39 edit_at_line 'CRM/Core/I18n/SchemaStructure_4_3_1.php' 193 edit_at_line 'CRM/Core/I18n/SchemaStructure_4_3_1.php' 235 edit_at_line 'CRM/Core/I18n/SchemaStructure_4_5_alpha1.php' 193 edit_at_line 'CRM/Core/I18n/SchemaStructure_4_5_alpha1.php' 235 edit_at_line 'CRM/Core/I18n/SchemaStructure_4_5_beta2.php' 190 edit_at_line 'CRM/Core/I18n/SchemaStructure_4_5_beta2.php' 228 edit_at_line 'CRM/Core/Smarty/plugins/block.crmRegion.php' 20 edit_at_line 'api/v3/Contact.php' 320 edit_at_line 'tests/phpunit/CRM/Batch/Form/EntryTest.php' 130 edit_at_line 'tests/phpunit/CRM/Contact/BAO/QueryTest.php' 145