github.com/swiftstack/ProxyFS@v0.0.0-20210203235616-4017c267d62f/enmesh_in_gopath.sh (about) 1 #!/bin/bash 2 3 # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 # SPDX-License-Identifier: Apache-2.0 5 6 # This script takes a clean checkout of the ProxyFS repo, turns it into a 7 # working directory (e.g., enmeshes it into src/github.com/swiftstack/Proxyfs) 8 # It is intended for use by CI/CD systems. 9 10 set -e 11 shopt -s extglob 12 13 ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 14 SWIFTSTACK_DIR=src/github.com/swiftstack 15 REPO_CLONE_PARENT_DIR=$ROOT_DIR/$SWIFTSTACK_DIR 16 PROXYFS_DIR=$REPO_CLONE_PARENT_DIR/ProxyFS 17 18 if [ ! -d $PROXYFS_DIR ]; then 19 cd $ROOT_DIR 20 mkdir -p $PROXYFS_DIR 21 mv !(ci.sh|src) $PROXYFS_DIR 22 23 # Ensure that the enmeshed dir is still usable as a git repo 24 mv .git* $PROXYFS_DIR 25 cp ci.sh $PROXYFS_DIR 26 fi