forked from Washington-University/HCPpipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshow_version
executable file
·40 lines (29 loc) · 843 Bytes
/
show_version
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
echo "========================================"
this_tools_dir=$(dirname "${BASH_SOURCE[0]}")
first_char=${this_tools_dir:0:1}
if [ "${first_char}" == "." ]; then
this_tools_dir="${PWD}${this_tools_dir:1}"
fi
echo " DIRECTORY: ${this_tools_dir}"
product_file="${this_tools_dir}/product.txt"
version_file="${this_tools_dir}/version.txt"
branch_file="${this_tools_dir}/branch.txt"
deployment_file="${this_tools_dir}/deployment.txt"
if [ -e "${product_file}" ] ; then
echo -n " PRODUCT: "
cat ${product_file}
fi
if [ -e "${version_file}" ] ; then
echo -n " VERSION: "
cat ${version_file}
fi
if [ -e "${branch_file}" ] ; then
echo -n " BRANCH: "
cat ${branch_file}
fi
if [ -e "${deployment_file}" ] ; then
echo -n " DEPLOYMENT: "
cat ${deployment_file}
fi
echo "========================================"