github.com/rohankumardubey/proxyfs@v0.0.0-20210108201508-653efa9ab00e/test/container/launch.sh (about)

     1  #!/bin/bash
     2  
     3  set -e
     4  set -x
     5  
     6  # Setup Samba
     7  # Ideally, these 3 vars should be populated with info from the system.
     8  # For now, it's just hardcoded.
     9  OS_DISTRO=centos
    10  OS_DISTRO_VERSION=7.4
    11  SAMBA_VERSION=4.6.12
    12  
    13  SAMBA_DIR=build-samba-`echo $SAMBA_VERSION | tr . -`-${OS_DISTRO}-`echo $OS_DISTRO_VERSION | tr . -`
    14  
    15  cd $GOPATH/src/github.com/swiftstack/ProxyFS/vfs
    16  
    17  if [[ -L samba ]]; then
    18      rm samba
    19  else
    20      if [[ -e samba ]]; then
    21          echo "non-symlink \$GOPATH/src/github.com/swiftstack/ProxyFS/vfs/samba cannot pre-exist"
    22          exit 1
    23      fi
    24  fi
    25  
    26  if [[ -d "${SAMBA_DIR}" ]]; then
    27      ln -s $SAMBA_DIR samba
    28  else
    29      git clone -b samba-$SAMBA_VERSION --single-branch --depth 1 https://github.com/samba-team/samba.git $SAMBA_DIR
    30      ln -s $SAMBA_DIR samba
    31      cd samba
    32      ./configure
    33      make clean
    34      make GEN_NDR_TABLES
    35  fi
    36  export SAMBA_SOURCE=$GOPATH/src/github.com/swiftstack/ProxyFS/vfs/samba
    37  
    38  # Build ProxyFS and run tests
    39  cd $GOPATH/src/github.com/swiftstack/ProxyFS
    40  make ci
    41  # $COVERALLS_TOKEN must be configured in TravisCI
    42  if [ -n "$COVERALLS_TOKEN" ] && [ -n "$TRAVIS_BRANCH" ]; then
    43      GIT_BRANCH=$TRAVIS_BRANCH goveralls -coverprofile coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN
    44  fi