File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,11 @@ echo_latest_version() {
8484}
8585
8686echo_standalone_postinstall () {
87+ if [ " ${DRY_RUN-} " ]; then
88+ echo_dryrun_postinstall
89+ return
90+ fi
91+
8792 cath << EOF
8893
8994Standalone release has been installed into $STANDALONE_INSTALL_PREFIX /bin/$STANDALONE_BINARY_NAME
105110}
106111
107112echo_systemd_postinstall () {
113+ if [ " ${DRY_RUN-} " ]; then
114+ echo_dryrun_postinstall
115+ return
116+ fi
117+
108118 echoh
109119 cath << EOF
110120$1 package has been installed.
@@ -125,6 +135,15 @@ Or, just run the server directly:
125135EOF
126136}
127137
138+ echo_dryrun_postinstall () {
139+ cath << EOF
140+
141+ Dry-run complete.
142+
143+ To install Coder, re-run this script without the --dry-run flag.
144+ EOF
145+ }
146+
128147main () {
129148 if [ " ${TRACE-} " ]; then
130149 set -x
@@ -241,6 +260,11 @@ main() {
241260
242261 distro_name
243262
263+ if [ " ${DRY_RUN-} " ]; then
264+ echoh " Running with --dry-run; the following are the commands that would be run if this were a real installation:"
265+ echoh
266+ fi
267+
244268 # Standalone installs by pulling pre-built releases from GitHub.
245269 if [ " $METHOD " = standalone ]; then
246270 if has_standalone; then
You can’t perform that action at this time.
0 commit comments