#!/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