diff --git a/bin/install b/bin/install new file mode 100755 index 0000000..c0f60cb --- /dev/null +++ b/bin/install @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +pip install $(./bin/pip-swh-packages --with-testing) diff --git a/bin/update b/bin/update index fce896e..bfa0e36 100755 --- a/bin/update +++ b/bin/update @@ -1,17 +1,28 @@ #!/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 + +if [ "$1" = "-i" -o "$1" = "--install" ] ; then + ./bin/install +fi