Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6879752

Browse files
committed
default to /usr/local instead
1 parenta16a04a commit6879752

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

‎install.sh

100644100755
Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,12 @@ Usage:
3939
Choose the installation method. Defaults to detect.
4040
- detect detects the system package manager and tries to use it.
4141
Full reference on the process is further below.
42-
- standalone installs a standalone release archive into ~/.local
43-
Add ~/.local/bin to your\$PATH to use it.
42+
- standalone installs a standalone release archive into /usr/local/bin
4443
4544
--prefix <dir>
46-
Sets the prefix used by standalone release archives. Defaults to ~/.local
47-
The release is unarchived into ~/.local/lib/coder-X.X.X
48-
and the binary symlinked into ~/.local/bin/coder
49-
To install system wide pass ---prefix=/usr/local
45+
Sets the prefix used by standalone release archives. Defaults to /usr/local
46+
and the binary is copied into /usr/local/bin
47+
To install in\$HOME, pass ---prefix=\$HOME/.local
5048
5149
--rsh <bin>
5250
Specifies the remote shell for remote installation. Defaults to ssh.
@@ -81,17 +79,27 @@ echo_latest_version() {
8179
}
8280

8381
echo_standalone_postinstall() {
84-
echoh
85-
cath<<EOF
82+
if ["$STANDALONE_INSTALL_PREFIX"= /usr/local ];then
83+
cath<<EOF
84+
85+
Standalone release has been installed into /usr/local/bin/coder
86+
87+
EOF
88+
else
89+
cath<<EOF
8690
Standalone release has been installed into$STANDALONE_INSTALL_PREFIX/bin/coder
8791
8892
Extend your path to use Coder:
89-
PATH="$STANDALONE_INSTALL_PREFIX/bin:\$PATH"
93+
PATH="$STANDALONE_INSTALL_PREFIX/bin:\$PATH"
9094
91-
Then run Coder (temporary):
95+
EOF
96+
fi
97+
cath<<EOF
98+
Run Coder (temporary):
9299
coder server --dev
100+
93101
Or run a production deployment with PostgreSQL:
94-
CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>"\
102+
CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>"\\
95103
coder server
96104
97105
EOF
@@ -216,7 +224,7 @@ main() {
216224
# These are used by the various install_* functions that make use of GitHub
217225
# releases in order to download and unpack the right release.
218226
CACHE_DIR=$(echo_cache_dir)
219-
STANDALONE_INSTALL_PREFIX=${STANDALONE_INSTALL_PREFIX:-$HOME/.local}
227+
STANDALONE_INSTALL_PREFIX=${STANDALONE_INSTALL_PREFIX:-/usr/local}
220228
VERSION=${VERSION:-$(echo_latest_version)}
221229
# These can be overridden for testing but shouldn't normally be used as it can
222230
# result in a broken coder.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp