forked from squeak-smalltalk/squeak-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helpers.sh
53 lines (42 loc) · 788 Bytes
/
helpers.sh
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
41
42
43
44
45
46
47
48
49
50
51
52
53
is_64bit() {
[[ "${TRAVIS_SMALLTALK_VERSION}" == *"64-"* ]]
}
is_32bit() {
! is_64bit
}
is_etoys() {
[[ "${TRAVIS_SMALLTALK_VERSION}" == "Etoys"* ]]
}
is_Squeak_50() {
[[ "${TRAVIS_SMALLTALK_VERSION}" == "Squeak-5.0" ]]
}
is_trunk() {
[[ "${TRAVIS_SMALLTALK_VERSION}" == *"trunk"* ]]
}
is_file() {
[[ -f $1 ]]
}
is_dir() {
[[ -d $1 ]]
}
is_nonzero() {
[[ $1 -ne 0 ]]
}
is_deployment_branch() {
[[ "${TRAVIS_BRANCH}" == "${DEPLOYMENT_BRANCH}" ]]
}
print_info() {
local message=$1
echo -e "\033[34;1m${message}\033[0m"
}
travis_fold() {
local action=$1
local name=$2
local title="${3:-}"
if [[ "${TRAVIS:-}" = "true" ]]; then
echo -en "travis_fold:${action}:${name}\r\033[0K"
fi
if [[ -n "${title}" ]]; then
print_info "${title}"
fi
}