diff --git a/bin/update b/bin/update index bfa0e36..d0c9fa2 100755 --- a/bin/update +++ b/bin/update @@ -1,28 +1,30 @@ #!/usr/bin/env bash if [ "$1" = "-h" -o "$1" = "--help" ] ; then echo "Usage: bin/update [OPTION].." echo "Options:" echo " -i/--install: install packages after update" exit 0 fi mrconf=$(readlink -f .mrconfig) mrtrust="${HOME}/.mrtrust" if ! grep -q "$mrconf" "$mrtrust" &> /dev/null ; then echo "I: mr repository not found in ${mrtrust}, adding it." echo "$mrconf" >> "$mrtrust" fi if ! which pre-commit &> /dev/null ; then echo "The pre-commit command is required, please install it before" echo "running this command. See README.md for more information." exit 1 fi git pull mr -j 4 update +mr run pre-commit install + if [ "$1" = "-i" -o "$1" = "--install" ] ; then ./bin/install fi