Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
68f3b2d7
Commit
68f3b2d7
authored
11 years ago
by
Andy Yates
Browse files
Options
Downloads
Patches
Plain Diff
Introducing the all mighty email blatter. Leaves only URLs behind
parent
164c2833
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/email_blatter.sh
+50
-0
50 additions, 0 deletions
misc-scripts/email_blatter.sh
with
50 additions
and
0 deletions
misc-scripts/email_blatter.sh
0 → 100755
+
50
−
0
View file @
68f3b2d7
#!/bin/bash
# Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
scan_and_replace
()
{
search
=
$1
replacement
=
$2
echo
"About to scan
$(
pwd
)
for files to replace '
$search
' with '
$replacement
'"
for
file
in
$(
grep
-R
--files-with-matches
"
$search
"
.
)
;
do
echo
"Replacing email in
$file
"
sed
-i
""
-e
"s/
$search
/
$replacement
/g"
$file
done
}
if
[
-z
"
$@
"
]
;
then
dirs
=
$(
pwd
)
else
dirs
=
$@
fi
original_wd
=
$(
pwd
)
for
var
in
"
$dirs
"
;
do
if
[
!
-d
$var
]
;
then
echo
"
$var
is not a directory. Skipping"
continue
fi
cd
$var
scan_and_replace
'helpdesk@ensembl.org'
'http:\/\/www.ensembl.org\/Help\/Contact'
scan_and_replace
'dev@ensembl.org'
'http:\/\/lists.ensembl.org\/mailman\/listinfo\/dev'
scan_and_replace
'announce@ensembl.org'
'http:\/\\/lists.ensembl.org\/mailman\/listinfo\/announce'
cd
$original_wd
done
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment