Collecting output from pip upgrade and returning to user

This commit is contained in:
James Barnsley
2018-04-21 21:59:40 +12:00
parent 22ba55004e
commit fa17dafe86
10 changed files with 112 additions and 69 deletions

View File

@ -1,15 +1,16 @@
#!/bin/bash
if [[ $1 = "upgrade" ]]; then
UPGRADE=$(pip install --upgrade mopidy-iris)
echo -e "$UPGRADE"
UPGRADE="$(pip install --upgrade mopidy-iris)"
echo -e "${UPGRADE}"
elif [[ $1 = "restart" ]]; then
sleep 5
RESTART=$(service mopidy restart)
echo -e "$RESTART"
sleep $2
RESTART="$(service mopidy restart)"
echo -e "${RESTART}"
fi
exit 0