Shin'ya M. > Updating rcs with 3 items... done
This commit is contained in:
17
git2fossil
Normal file
17
git2fossil
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
# Convert a git repository to fossil
|
||||
|
||||
for i in fossil git; do
|
||||
if ! command -v $i >/dev/null; then
|
||||
echo "$i: command not found"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
printf "usage: %s repo-name\n" "$0"
|
||||
printf "requires an already cloned repository\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
(cd ${1}; git fast-export --all) | fossil import --git ${1}.fossil
|
||||
Reference in New Issue
Block a user