mirror of
https://github.com/lroche/hg2git.git
synced 2026-07-27 19:55:48 +00:00
23 lines
375 B
Bash
23 lines
375 B
Bash
#!/bin/bash
|
|
|
|
PROJECT_NAME=$1
|
|
if [ "$PROJECT_NAME" == "" ]
|
|
then
|
|
PROJECT_NAME="project"
|
|
fi
|
|
|
|
cd /work/result
|
|
mkdir -p $PROJECT_NAME-git
|
|
cd $PROJECT_NAME-git
|
|
git init
|
|
#avoid having unexpected issue:
|
|
git config core.ignoreCase false
|
|
|
|
/usr/local/src/fast-export/hg-fast-export.sh -r /work/$PROJECT_NAME
|
|
|
|
if [ "$?" -ne "0" ]; then
|
|
exit 1
|
|
else
|
|
git checkout HEAD
|
|
bash
|
|
fi |