Git hook, run Rust lang unit test
#!/bin/sh
REPO_NAME=papers_database
GIT_DIR=$HOME/$REPO_NAME.git
WORK_DIR=$HOME/work/$REPO_NAME
mkdir -p $WORK_DIR
git --work-tree=$WORK_DIR --git-dir=$GIT_DIR checkout -f
cd $WORK_DIR
export PATH="$HOME/.cargo/bin:$PATH"
cargo test