reactjs/react-rails

View on GitHub
check_for_uncommitted_files.sh

Summary

Maintainability
Test Coverage
#!/bin/bash
set -e

status=$(git status --porcelain)
if [ -n "$status" ]; then
  status="${status//'%'/'%25'}"
  status="${status//$'\n'/'%0A'}"
  status="${status//$'\r'/'%0D'}"
  echo "$status"
  exit 1
else
  echo "The repository is clean"
  exit 0
fi