Skip to content

Commit

Permalink
Make a few minor improvements to install script (#194)
Browse files Browse the repository at this point in the history
* 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().
  • Loading branch information
ab authored Feb 12, 2025
1 parent 4b9f1ca commit b446ab4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
sublime_mantis:
image: sublimesec/mantis:1.57
Expand Down
4 changes: 3 additions & 1 deletion install-and-launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if [ -z "$interactive" ]; then
# ascii art
# credit: https://patorjk.com/
# font: Cyberlarge
cat <<EOF
cat <<'EOF'
======================================================================
| _______ _ _ ______ _____ _______ _______ |
Expand Down Expand Up @@ -410,6 +410,8 @@ launch_sublime() {
else
echo "Daily update check is already setup"
fi
else
echo "Automatic updates not enabled"
fi

print_info "Launching Sublime Platform..."
Expand Down
2 changes: 1 addition & 1 deletion update-and-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ -z "$(git status --porcelain)" ]; then
echo "git working dir clean. Proceeding with git updates."

old_ref=$(git rev-parse HEAD)
git pull
logrun git pull
new_ref=$(git rev-parse HEAD)

if [ "${old_ref}" != "${new_ref}" ]; then
Expand Down
5 changes: 5 additions & 0 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,8 @@ print_info() {
print_warning() {
print_color "\n$1\n" "warning"
}

logrun() {
echo >&2 "+ $*"
"$@"
}

0 comments on commit b446ab4

Please sign in to comment.