2016-02-18 20:16:41 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# Minio Cloud Storage, (C) 2015, 2016 Minio, Inc.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
|
|
|
|
main() {
|
2016-11-07 16:28:41 -05:00
|
|
|
echo "Checking project is in GOPATH:"
|
|
|
|
|
|
|
|
IFS=':' read -r -a paths <<< "$GOPATH"
|
|
|
|
for path in "${paths[@]}"; do
|
|
|
|
minio_path="$path/src/github.com/minio/minio"
|
|
|
|
if [ -d "$minio_path" ]; then
|
2016-11-09 13:09:42 -05:00
|
|
|
if [ "$minio_path" -ef "$PWD" ]; then
|
2016-11-07 16:28:41 -05:00
|
|
|
exit 0
|
|
|
|
fi
|
2016-02-18 20:16:41 -05:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2016-11-07 16:28:41 -05:00
|
|
|
echo "ERROR"
|
|
|
|
echo "Project not found in ${GOPATH}."
|
|
|
|
echo "Follow instructions at https://github.com/minio/minio/blob/master/CONTRIBUTING.md#setup-your-minio-github-repository"
|
|
|
|
exit 1
|
|
|
|
}
|
2016-02-18 20:16:41 -05:00
|
|
|
|
2016-11-07 16:28:41 -05:00
|
|
|
main
|