#!/usr/bin/env sh
gitpullorigin$(gitrev-parse--abbrev-refHEAD)||exit-1
ifpgreppeertube>/dev/null;thenecho'PeerTube is running!'exit0fi
npminstall
npmupdate
cdclient&&npmupdate&&cd../
npmrunbuild
echo"\n\nUpgrade finished! You can restart PeerTube that may run the migration scripts."