Skip to content

Commit

Permalink
Add patchComponent.sh script
Browse files Browse the repository at this point in the history
Adding Emacs backup files extension to .gitignore
  • Loading branch information
todor-ivanov committed May 15, 2020
1 parent d2fb9d8 commit 08c4938
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*~
*.pyc
*-min.js
*-min.css
Expand Down
23 changes: 23 additions & 0 deletions bin/patchComponent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

usage()
{
echo -ne "\nA simple script to facilitate component patching\n"
echo -ne "and to decrease the development && testing turnaround time.\n"
echo -ne "Usage: \n"
echo -ne "\t git diff --no-color | ./patchComponent.sh (reqmon | reqmgr2 | reqmgr2ms...)\n or:\n"
echo -ne "\t curl https://patch-diff.githubusercontent.com/raw/dmwm/deployment/pull/740.patch | ./patchComponent.sh (reqmon | reqmgr2 | reqmgr2ms...)\n"
exit 1
}

# TODO: To check against a list of components
component=$1
[[ -z $component ]] && usage

echo "Patching component: $component"

# TODO: To fix path differences for wmagents and central services
rootDir=/data/srv/current/apps/$component/lib/python2.7/site-packages/
stripLevel=3

patch --verbose -b --version-control=numbered -d $rootDir -p$stripLevel

0 comments on commit 08c4938

Please sign in to comment.