Home | History | Annotate | Download | only in scripts
      1 #!/bin/bash
      2 # Entry point to build the Eclipse plugins for local deployment.
      3 #
      4 # Input parameters:
      5 # $1: Optional build number. If present, will be appended to the date qualifier.
      6 #     The build number cannot contain spaces *nor* periods (dashes are ok.)
      7 # -i: Optional, if present, the Google internal update site will be built. Otherwise, 
      8 #     the external site will be built
      9 #
     10 # Workflow:
     11 # - calls buildserver with /home/$USER/www/no_crawl and -z
     12 #   to build and create the update size but do not zip it in the destination directory.
     13 
     14 set -e  # Fail this script as soon as a command fails -- fail early, fail fast
     15 
     16 D=`dirname $0`
     17 BUILD_NUMBER=""
     18 INTERNAL_BUILD=""
     19 # parse input parameters
     20 while [ $# -gt 0 ]; do
     21   if [ "$1" == "-i" ]; then
     22     INTERNAL_BUILD="-i"
     23   elif [ "$1" != "" ]; then
     24     BUILD_NUMBER="$1"
     25   fi
     26   shift
     27 done
     28 
     29 DEST_DIR="$HOME"
     30 [ -z "$DEST_DIR" ] && [ -n "$USER" ] && DEST_DIR="/home/$USER"
     31 [ -z "$DEST_DIR" ] && DEST_DIR="~"
     32 DEST_DIR="$DEST_DIR/www/no_crawl"
     33 
     34 "$D/build_server.sh" "$DEST_DIR" "$BUILD_NUMBER" -z "$INTERNAL_BUILD"
     35