Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
script to create git repository from svn package
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
# move a PEAR package to github | ||
if [ -z "$1" ]; then | ||
echo pass package name as only parameter | ||
exit 1 | ||
fi | ||
package=$1 | ||
|
||
firstrev=`svn log -q http://svn.php.net/repository/pear/packages/$package\ | ||
|tail -n2\ | ||
|head -n1\ | ||
|awk '{split($0,a," "); print a[1]}'\ | ||
|sed 's/r//'` | ||
echo "First SVN revision: $firstrev" | ||
git svn clone -s http://svn.php.net/repository/pear/packages/$package/\ | ||
-r $firstrev\ | ||
--authors-file=./authors.txt | ||
cd $package | ||
git svn rebase | ||
git remote add origin git@github.com:pear/$package.git | ||
echo "Visit https://github.com/pear/$package now" | ||
echo "or create it at https://github.com/organizations/pear/repositories/new" | ||
echo "then run" | ||
echo "$ git push -u origin master" |