github.com/rohankumardubey/proxyfs@v0.0.0-20210108201508-653efa9ab00e/saio/bin/provision_samba_source (about) 1 #!/bin/bash 2 3 # Setup Samba Source 4 5 cd /vagrant/src/github.com/swiftstack/ProxyFS/vfs 6 if [[ -d samba4-6-centos ]] 7 then 8 if [[ -L samba4-6-centos ]] 9 then 10 echo "non-directory symlink \$GOPATH/src/github.com/swiftstack/ProxyFS/vfs/samba4-6-centos cannot pre-exist" 11 exit 1 12 else 13 echo "\$GOPATH/src/github.com/swiftstack/ProxyFS/vfs/samba4-6-centos assumed to be as desired" 14 fi 15 else 16 if [[ -L samba4-6-centos ]] 17 then 18 echo "non-directory symlink \$GOPATH/src/github.com/swiftstack/ProxyFS/vfs/samba4-6-centos cannot pre-exist" 19 exit 1 20 else 21 git clone -b v4-6-stable --single-branch --depth 1 https://github.com/samba-team/samba.git samba4-6-centos 22 fi 23 fi 24 if [[ -L samba ]] 25 then 26 samba_symlink_target=`readlink "samba"` 27 if [[ "samba4-6-centos" == "$samba_symlink_target" ]] 28 then 29 echo "symlink samba -> samba4-6-centos already" 30 else 31 echo "redirecting samba -> samba4-6-centos" 32 rm samba 33 ln -s samba4-6-centos samba 34 fi 35 else 36 if [[ -e samba ]] 37 then 38 echo "non-symlink \$GOPATH/src/github.com/swiftstack/ProxyFS/vfs/samba cannot pre-exist" 39 exit 1 40 else 41 echo "establishing samba -> samba4-6-centos" 42 ln -s samba4-6-centos samba 43 fi 44 fi 45 cd samba 46 if [[ -d bin ]] 47 then 48 echo "./configure has already been run" 49 else 50 ./configure 51 make clean 52 fi 53 if [[ -f bin/default/librpc/gen_ndr/ndr_smb_acl.h ]] 54 then 55 echo "make GEN_NDR_TABLES has already been run" 56 else 57 make clean 58 make GEN_NDR_TABLES 59 fi