Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
彭彦祖
code-server
提交
e0172d09
C
code-server
项目概览
彭彦祖
/
code-server
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
code-server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
e0172d09
编写于
5月 21, 2020
作者:
A
Anmol Sethi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor fixes for install.sh and bundle in libstdc++
Closes #1706
上级
c80b2748
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
50 addition
and
34 deletion
+50
-34
README.md
README.md
+8
-6
ci/build/build-static-release.sh
ci/build/build-static-release.sh
+2
-1
doc/install.md
doc/install.md
+1
-2
install.sh
install.sh
+39
-25
未找到文件。
README.md
浏览文件 @
e0172d09
...
...
@@ -29,6 +29,8 @@ curl -fsSL https://code-server.dev/install.sh | sh
```
$ curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run --help
$0 [--dry-run] [--version X.X.X] [--static <install-prefix>=~/.local]
Installs latest code-server on any macOS or Linux system preferring to use the OS package manager.
curl -fsSL https://code-server.dev/install.sh | sh -s --
...
...
@@ -37,29 +39,29 @@ Installs latest code-server on any macOS or Linux system preferring to use the O
- For Fedora, CentOS, RHEL, openSUSE it will install the latest rpm package.
- For Arch Linux it will install the AUR package.
- For any unrecognized Linux operating system it will install the latest static release into ~/.local
- Add ~/.local/bin to your $PATH to run code-server.
- Add ~/.local/bin to your
\
$PATH to run code-server.
- For macOS it will install the Homebrew package.
- If Homebrew is not installed it will install the latest static release into ~/.local
- Add ~/.local/bin to your $PATH to run code-server.
- Add ~/.local/bin to your
\
$PATH to run code-server.
- If ran on an architecture with no binary releases or
outdated libc/libcxx
, it will install the
- If ran on an architecture with no binary releases or
glibc < v2.17
, it will install the
npm package with yarn or npm.
- We only have binary releases for amd64 and arm64 presently.
--dry-run Enables a dry run where where the steps that would have taken place
are printed but do not actually execute.
--version Pass to install a specific version instead of the latest release.
--static Forces the installation of a static release into ~/.local
This flag takes an optional argument for the installation prefix which defaults to "~/.local".
code-server will be unarchived into ~/.local/lib/code-server.X.X.X and the binary will be symlinked
into "~/.local/bin/code-server". You will need to add ~/.local/bin to your $PATH to use it without
into "~/.local/bin/code-server". You will need to add ~/.local/bin to your
\
$PATH to use it without
the full path.
To install system wide set the prefix to /usr/local.
--version Pass to install a specific version instead of the latest release.
```
If you still don't trust our install script, even with the above explaination and the dry run, we have
...
...
ci/build/build-static-release.sh
浏览文件 @
e0172d09
...
...
@@ -16,7 +16,8 @@ main() {
mkdir
-p
"
$RELEASE_PATH
/bin"
rsync ./ci/build/code-server.sh
"
$RELEASE_PATH
/bin/code-server"
rsync
"
$node_path
"
"
$RELEASE_PATH
/lib/node"
g++
-Wl
,--allow-multiple-definition
"
$node_path
"
-static-libstdc
++
-static-libgcc
-o
"
$RELEASE_PATH
/lib/node"
ln
-s
"./bin/code-server"
"
$RELEASE_PATH
/code-server"
ln
-s
"./lib/node"
"
$RELEASE_PATH
/node"
...
...
doc/install.md
浏览文件 @
e0172d09
...
...
@@ -64,8 +64,7 @@ systemctl --user enable --now code-server
We recommend installing with
`yarn`
or
`npm`
if:
1.
We don't have a precompiled release for your machine's platform or architecture.
2.
libc < v2.19
3.
libcxx < 3.4.20
2.
glibc < v2.17.
**note:**
Installing via
`yarn`
or
`npm`
builds native modules on install and so requires C dependencies.
See
[
./doc/npm.md
](
./doc/npm.md
)
for installing these dependencies.
...
...
install.sh
浏览文件 @
e0172d09
...
...
@@ -2,13 +2,28 @@
set
-eu
usage
()
{
cli
=
"
$0
"
if
[
"
$0
"
=
sh
]
;
then
cli
=
"curl -fsSL https://code-server.dev/install.sh | sh -s --"
else
curl_usage
=
"
$(
cat
<<
EOF
To use latest:
curl -fsSL https://code-server.dev/install.sh | sh -s -- <args>
EOF
)
"$"
\n
"
fi
cat
<<
EOF
$0
[--dry-run] [--version X.X.X] [--static <install-prefix>=~/.local]
Installs latest code-server on Linux or macOS preferring to use the system package manager.
Installs latest code-server on any macOS or Linux system preferring to use the OS package manager.
Lives at https://code-server.dev/install.sh
curl -fsSL https://code-server.dev/install.sh | sh -s --
Usage:
$cli
[--dry-run] [--version X.X.X] [--static <install-prefix>=~/.local]
${
curl_usage
-
}
- For Debian, Ubuntu, Raspbian it will install the latest deb package.
- For Fedora, CentOS, RHEL, openSUSE it will install the latest rpm package.
- For Arch Linux it will install the AUR package.
...
...
@@ -19,8 +34,7 @@ Installs latest code-server on any macOS or Linux system preferring to use the O
- If Homebrew is not installed it will install the latest static release into ~/.local
- Add ~/.local/bin to your
\$
PATH to run code-server.
- If ran on an architecture with no binary releases or outdated libc/libcxx, it will install the
npm package with yarn or npm.
- If ran on an architecture with no binary releases, it will install the npm package with yarn or npm.
- We only have binary releases for amd64 and arm64 presently.
--dry-run Enables a dry run where where the steps that would have taken place
...
...
@@ -40,9 +54,9 @@ EOF
}
echo_latest_version
()
{
version
=
"
$(
curl
-fsSL
https://api.github.com/repos/cdr/code-server/releases/latest | jq
-r
.tag_name
)
"
# Strip leading v.
version
=
"
${
version
:1
}
"
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860
version
=
"
$(
curl
-fsSLI
-o
/dev/null
-w
"%{url_effective}"
https://github.com/cdr/code-server/releases/latest
)
"
version
=
"
${
version
#https
://github.com/cdr/code-server/releases/tag/v
}
"
echo
"
$version
"
}
...
...
@@ -172,7 +186,7 @@ parse_arg() {
*
=
*
)
opt
=
"
${
1
#=*
}
"
optarg
=
"
${
1
#*=
}
"
if
[
!
"
$optarg
"
-a
!
"
${
OPTIONAL
-
}
"
]
;
then
if
[
!
"
$optarg
"
]
&&
[
!
"
${
OPTIONAL
-
}
"
]
;
then
echoerr
"
$opt
requires an argument"
echoerr
"Run with --help to see usage."
exit
1
...
...
@@ -183,7 +197,7 @@ parse_arg() {
esac
case
"
${
2
-
}
"
in
""
|
-
*
|
--
*
)
""
|
-
*
)
if
[
!
"
${
OPTIONAL
-
}
"
]
;
then
echoerr
"
$1
requires an argument"
echoerr
"Run with --help to see usage."
...
...
@@ -282,7 +296,7 @@ install_static() {
fi
SKIP_ECHO
=
1 sh_c
mkdir
-p
"
$STATIC_INSTALL_PREFIX
/lib"
"
$STATIC_INSTALL_PREFIX
/bin"
if
[
[
-e
"
$STATIC_INSTALL_PREFIX
/lib/code-server-
$VERSION
"
]
]
;
then
if
[
-e
"
$STATIC_INSTALL_PREFIX
/lib/code-server-
$VERSION
"
]
;
then
echo
echoerr
"code-server-
$VERSION
is already installed at
$STATIC_INSTALL_PREFIX
/lib/code-server-
$VERSION
"
echoerr
"Please remove it to reinstall."
...
...
@@ -339,21 +353,20 @@ distro() {
return
fi
if
[
!
-f
/etc/os-release
]
;
then
if
[
-f
/etc/os-release
]
;
then
(
.
/etc/os-release
case
"
$ID
"
in
opensuse-
*
)
# opensuse's ID's look like opensuse-leap and opensuse-tumbleweed.
echo
"opensuse"
return
;;
esac
echo
"
$ID
"
)
return
fi
(
.
/etc/os-release
case
"
$ID
"
in
opensuse-
*
)
# opensuse's ID's look like opensuse-leap and opensuse-tumbleweed.
echo
"opensuse"
return
;;
esac
echo
"
$ID
"
)
}
# os_name prints a pretty human readable name for the OS/Distro.
...
...
@@ -363,11 +376,12 @@ distro_name() {
return
fi
if
[
!
-f
/etc/os-release
]
;
then
if
[
-f
/etc/os-release
]
;
then
(
.
/etc/os-release
echo
"
$PRETTY_NAME
"
)
return
fi
# Prints something like: Linux 4.19.0-9-amd64
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录