Skip to content

Commit b446ab4

Browse files
authored
Make a few minor improvements to install script (#194)
* Echo when auto updates not enabled. It was confusing to echo the header for enabling automatic updates and then do/print nothing. * Log that we are running git pull. This is helpful for anyone who has an ssh-agent that requires PIN / touch confirmation, to know that the script is blocked on git pull. * Remove deprecated docker-compose version field. This silences this warning: docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion * Fix unescaped \ in ascii art. * Rename run() to logrun().
1 parent 4b9f1ca commit b446ab4

4 files changed

+9
-4
lines changed

docker-compose.yml

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
sublime_mantis:
53
image: sublimesec/mantis:1.57

install-and-launch.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ if [ -z "$interactive" ]; then
8080
# ascii art
8181
# credit: https://patorjk.com/
8282
# font: Cyberlarge
83-
cat <<EOF
83+
cat <<'EOF'
8484
8585
======================================================================
8686
| _______ _ _ ______ _____ _______ _______ |
@@ -410,6 +410,8 @@ launch_sublime() {
410410
else
411411
echo "Daily update check is already setup"
412412
fi
413+
else
414+
echo "Automatic updates not enabled"
413415
fi
414416

415417
print_info "Launching Sublime Platform..."

update-and-run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if [ -z "$(git status --porcelain)" ]; then
2929
echo "git working dir clean. Proceeding with git updates."
3030

3131
old_ref=$(git rev-parse HEAD)
32-
git pull
32+
logrun git pull
3333
new_ref=$(git rev-parse HEAD)
3434

3535
if [ "${old_ref}" != "${new_ref}" ]; then

utils.sh

+5
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ print_info() {
4848
print_warning() {
4949
print_color "\n$1\n" "warning"
5050
}
51+
52+
logrun() {
53+
echo >&2 "+ $*"
54+
"$@"
55+
}

0 commit comments

Comments
 (0)