summaryrefslogtreecommitdiff
path: root/vendor/packaged/thrift/update.sh
blob: 20cf145a72da7a050f536a8886df80adbfdc9ba7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

TAG=$1

if [[ "$TAG" == "" ]]; then
  echo "no branch or tag specified"
  exit 1
fi

cd "$(dirname $0)"
git clone --depth=1 --branch=$TAG [email protected]:apache/thrift tmp

# Move old file to an upper level to fit the new requirements of psr-4
if [ -d "src/Thrift" ]
then
  mv src/Thrift/* src/ && rm -Rf src/Thrift
fi

rm -Rf src/Thrift
cp -R tmp/lib/php/lib/* src/
rm -Rf tmp
cd -