#!/bin/bash ## usage: bash cleanup-Drupal.Commenting.DocComment.ContentAfterOpen.sh vi ## usage: bash cleanup-Drupal.Commenting.DocComment.ContentAfterOpen.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 'Drupal.Commenting.DocComment.ContentAfterOpen' echo Number of lines: 13 echo Examples: 'Array ( [0] => The open comment tag must be the only content on the line ) ' echo Press ENTER to begin read edit_at_line 'CRM/Core/Payment/PayPalImpl.php' 777 edit_at_line 'CRM/Member/BAO/MembershipType.php' 757 edit_at_line 'CRM/Queue/Task.php' 33 edit_at_line 'CRM/Queue/Task.php' 36 edit_at_line 'CRM/Report/Form/Activity.php' 298 edit_at_line 'CRM/Utils/REST.php' 472 edit_at_line 'CRM/Utils/REST.php' 525 edit_at_line 'tests/phpunit/api/v3/SyntaxConformanceTest.php' 51 edit_at_line 'tests/phpunit/api/v3/SyntaxConformanceTest.php' 56 edit_at_line 'tests/phpunit/api/v3/SyntaxConformanceTest.php' 500 edit_at_line 'tests/phpunit/api/v3/SyntaxConformanceTest.php' 868 edit_at_line 'tests/phpunit/api/v3/SyntaxConformanceTest.php' 1098 edit_at_line 'tests/phpunit/api/v3/SyntaxConformanceTest.php' 1100