Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
myhjmzy
code-server
提交
3d9e3b87
C
code-server
项目概览
myhjmzy
/
code-server
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
3d9e3b87
编写于
6月 13, 2020
作者:
A
Anmol Sethi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add FreeBSD support to install script
上级
264abed8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
29 addition
and
7 deletion
+29
-7
README.md
README.md
+1
-1
doc/guide.md
doc/guide.md
+1
-1
doc/install.md
doc/install.md
+3
-1
install.sh
install.sh
+24
-4
未找到文件。
README.md
浏览文件 @
3d9e3b87
...
...
@@ -20,7 +20,7 @@ For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
### Quick Install
We have a
[
script
](
./install.sh
)
to install code-server for Linux
and macOS
.
We have a
[
script
](
./install.sh
)
to install code-server for Linux
, macOS and FreeBSD
.
It tries to use the system package manager if possible.
...
...
doc/guide.md
浏览文件 @
3d9e3b87
...
...
@@ -80,7 +80,7 @@ to avoid the slow dashboard.
## 2. Install code-server
We have a
[
script
](
../install.sh
)
to install
`code-server`
for Linux
and macOS
.
We have a
[
script
](
../install.sh
)
to install
`code-server`
for Linux
, macOS and FreeBSD
.
It tries to use the system package manager if possible.
...
...
doc/install.md
浏览文件 @
3d9e3b87
...
...
@@ -20,7 +20,7 @@ various distros and operating systems.
## install.sh
We have a
[
script
](
../install.sh
)
to install code-server for Linux
and macOS
.
We have a
[
script
](
../install.sh
)
to install code-server for Linux
, macOS and FreeBSD
.
It tries to use the system package manager if possible.
...
...
@@ -70,6 +70,8 @@ commands presented in the rest of this document.
-
If Homebrew is not installed it will install the latest standalone release into
`~/.local`
.
-
Add
`~/.local/bin`
to your
`$PATH`
to run code-server.
-
For FreeBSD, it will install the
[
npm package
](
#yarn-npm
)
with
`yarn`
or
`npm`
.
-
If ran on an architecture with no releases, it will install the
[
npm package
](
#yarn-npm
)
with
`yarn`
or
`npm`
.
-
We only have releases for amd64 and arm64 presently.
-
The
[
npm package
](
#yarn-npm
)
builds the native modules on postinstall.
...
...
install.sh
浏览文件 @
3d9e3b87
...
...
@@ -14,7 +14,7 @@ usage() {
fi
cath
<<
EOF
Installs code-server for Linux
and macOS
.
Installs code-server for Linux
, macOS and FreeBSD
.
It tries to use the system package manager if possible.
After successful installation it explains how to start using code-server.
${
not_curl_usage
-
}
...
...
@@ -48,6 +48,8 @@ Usage:
- If Homebrew is not installed it will install the latest standalone release
into ~/.local
- For FreeBSD, it will install the npm package with yarn or npm.
- If ran on an architecture with no releases, it will install the
npm package with yarn or npm.
- We only have releases for amd64 and arm64 presently.
...
...
@@ -160,7 +162,7 @@ main() {
ARCH
=
"
$(
arch
)
"
if
[
!
"
$ARCH
"
]
;
then
if
[
"
$METHOD
"
=
standalone
]
;
then
echoerr
"No
releases available for the architecture
$(
uname
-m
)
."
echoerr
"No
precompiled releases for
$(
uname
-m
)
."
echoerr
'Please rerun without the "--method standalone" flag to install from npm.'
exit
1
fi
...
...
@@ -169,6 +171,17 @@ main() {
return
fi
if
[
"
$OS
"
=
"freebsd"
]
;
then
if
[
"
$METHOD
"
=
standalone
]
;
then
echoerr
"No precompiled releases available for
$OS
."
echoerr
'Please rerun without the "--method standalone" flag to install from npm.'
exit
1
fi
echoh
"No precompiled releases available for
$OS
."
install_npm
return
fi
CACHE_DIR
=
"
$(
echo_cache_dir
)
"
if
[
"
$METHOD
"
=
standalone
]
;
then
...
...
@@ -360,6 +373,9 @@ os() {
Darwin
)
echo
macos
;;
FreeBSD
)
echo
freebsd
;;
esac
}
...
...
@@ -371,11 +387,12 @@ os() {
# - centos, fedora, rhel, opensuse
# - alpine
# - arch
# - freebsd
#
# Inspired by https://github.com/docker/docker-install/blob/26ff363bcf3b3f5a00498ac43694bf1c7d9ce16c/install.sh#L111-L120.
distro
()
{
if
[
"
$
(
uname
)
"
=
"Darwin
"
]
;
then
echo
"
macos
"
if
[
"
$
OS
"
=
"macos"
]
||
[
"
$OS
"
=
"freebsd
"
]
;
then
echo
"
$OS
"
return
fi
...
...
@@ -422,6 +439,9 @@ arch() {
x86_64
)
echo
amd64
;;
amd64
)
# FreeBSD.
echo
amd64
;;
esac
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录