www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

update_build.sh (701B)


      1 #!/bin/sh
      2 
      3 set -e
      4 set -o xtrace
      5 
      6 BUILDROOT=$(realpath $1)
      7 STREAM=$2
      8 if [ "$STREAM" = "" ]; then
      9     STREAM=master
     10 fi
     11 
     12 # First argument is the name of the component
     13 build_component() {
     14     SUDO=sudo
     15     if [ ! -d $BUILDROOT/$1 ]; then
     16         echo "Component $1 not found, skipping ..."
     17         return
     18     else
     19         PREFIX=$(meson configure ./build | grep "Installation prefix" | awk '{print $2}')
     20         if [ -w $PREFIX ]; then
     21             SUDO=
     22         fi
     23     fi
     24 
     25     cd $BUILDROOT/$1
     26     git fetch origin
     27     git checkout origin/${STREAM}
     28     git submodule update --init
     29     ninja -C build
     30     $SUDO ninja -C build install
     31 }
     32 
     33 build_component wayfire
     34 build_component wf-shell
     35 build_component wcm