Changeset View
Changeset View
Standalone View
Standalone View
bin/update
#!/bin/bash | #!/usr/bin/env bash | ||||
mrconf=$(readlink -f .mrconfig) | mrconf=$(readlink -f .mrconfig) | ||||
mrtrust="${HOME}/.mrtrust" | mrtrust="${HOME}/.mrtrust" | ||||
if ! grep -q "$mrconf" "$mrtrust" &> /dev/null ; then | if ! grep -q "$mrconf" "$mrtrust" &> /dev/null ; then | ||||
echo "I: mr repository not found in ${mrtrust}, adding it." | echo "I: mr repository not found in ${mrtrust}, adding it." | ||||
echo "$mrconf" >> "$mrtrust" | echo "$mrconf" >> "$mrtrust" | ||||
fi | fi | ||||
if ! which pre-commit &> /dev/null ; then | if ! which pre-commit &> /dev/null ; then | ||||
echo "The pre-commit command is required, please install it before" | echo "The pre-commit command is required, please install it before" | ||||
echo "running this command. See README.md for more information." | echo "running this command. See README.md for more information." | ||||
exit 1 | exit 1 | ||||
fi | fi | ||||
git pull | git pull | ||||
mr -j 4 update | mr -j 4 update |