EXTRA_MODULES="\
gst-editing-services \
gst-rtsp-server \
- gst-python \
- gnonlin"
+ gst-python"
tmp=${TMPDIR-/tmp}
tmp=$tmp/git-update.$(date +%Y%m%d-%H%M-).$RANDOM.$RANDOM.$RANDOM.$$
}
ERROR_LOG="$tmp/failures.log"
-touch $ERROR_LOG
ERROR_RETURN=255
+CPUCORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo "1")
+
for m in $CORE $MODULES $EXTRA_MODULES; do
if test -d $m; then
echo "+ updating $m"
cd $m
- git pull origin master
+ git pull --rebase
if test $? -ne 0
then
echo "$m: update (trying stash, pull, stash apply)" >> $ERROR_LOG
git stash
- git pull origin master
+ git pull --rebase
if test $? -ne 0
then
echo "$m: update" >> $ERROR_LOG
fi
echo "+ $1: make"
- make > "$tmp/$1-make.log" 2>&1
+ MAKEFLAGS="-j$CPUCORES $MAKEFLAGS" make > "$tmp/$1-make.log" 2>&1
if test $? -ne 0
then
echo "$1: make [$tmp/$1-make.log]" >> $ERROR_LOG
echo
cat $ERROR_LOG
else
+ echo "Update done"
rm -rf "$tmp"
fi
exit