dev/sg: make 'sg install' nicer to use for local dev
Created by: bobheadxi
Since sg update
can no longer be used to globally install a custom build of sg
, this PR makes a few improvements such that a one-liner like the following can easily be used to install sg
globally (e.g. to test autocompletions):
go build -o ./sg ./dev/sg && ./sg install -f -p=false
-
--force, -f
: Delete any existingsg
installation and proceed immediately to installation -
--profile, -p
: When set tofalse
, do not prompt for an update to profile files
Stacked on https://github.com/sourcegraph/sourcegraph/pull/33758
Test plan
go build -o ./sg ./dev/sg && ./sg install -f -p=false