Skip to content
Newer
Older
100755 27 lines (26 sloc) 577 Bytes
3832bb2 @cbeams Add convenience script for creating repro projects
cbeams authored Sep 4, 2011
1 #!/bin/bash
2 if [ -z "$1" ]; then
3 echo "usage: $0 [sourcedir] jira-id"
4 exit 1
5 fi
6 if [ -z "$2" ]; then
7 source_dir='SPR-0000' # default
8 target_dir=$1
9 else
10 source_dir=$1
11 target_dir=$2
12 fi
13 if [ ! -d "$source_dir" ]; then
14 echo "source directory $source_dir does not exist"
15 exit 2
16 fi
17 if [ -d "$target_dir" ]; then
18 echo "target directory $target_dir already exists"
19 exit 3
20 fi
21 expr="s/$source_dir/$target_dir/"
22 set -x
23 mkdir $target_dir
24 cp -r $source_dir/src $target_dir/
25 cp $source_dir/pom.xml $target_dir/
26 perl -p -i -e $expr $target_dir/pom.xml
Something went wrong with that request. Please try again.