Revision 1491675ea91be2696eb9b3a0574c91ea62df075d authored by Grégoire Henry on 14 February 2019, 10:35:22 UTC, committed by Pierre Boutillier on 16 April 2019, 15:38:33 UTC
1 parent af5ed9c
Raw File
reset_chain.sh
#! /bin/sh

script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
cd "$script_dir"/..

branch=$1
has_git() {
    which git && [ -d .git ]
}

if has_git && ! [ -z "$(git status -s)" ] ; then
    echo "This script cannot be applied within a dirty git directory,"
    echo "you need 'stash' or 'commit' your changes before."
    exit 1
fi

set -e

cd scripts

ocaml gen_genesis.ml

git commit -a -m "Reset the chain"
back to top