Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
koalaman
ShellCheck
提交
d473fb88
S
ShellCheck
项目概览
镜像
/
koalaman
/
ShellCheck
上一次同步 11 个月
通知
42
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
ShellCheck
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d473fb88
编写于
1月 13, 2016
作者:
V
Vidar Holen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use system over callCommand to allow linking on ghc 7.6.3.
上级
f7543637
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
14 deletion
+8
-14
Setup.hs
Setup.hs
+4
-11
ShellCheck.cabal
ShellCheck.cabal
+4
-3
未找到文件。
Setup.hs
浏览文件 @
d473fb88
...
...
@@ -8,21 +8,13 @@ import Distribution.Simple (
simpleUserHooks
)
import
Distribution.Simple.Setup
(
SDistFlags
)
-- | This requires the process package from,
--
-- https://hackage.haskell.org/package/process
--
import
System.Process
(
callCommand
)
import
System.Process
(
system
)
-- | This will use almost the default implementation, except we switch
-- out the default pre-sdist hook with our own, 'myPreSDist'.
--
main
=
defaultMainWithHooks
myHooks
where
myHooks
=
simpleUserHooks
{
preSDist
=
myPreSDist
}
-- | This hook will be executed before e.g. @cabal sdist@. It runs
-- pandoc to create the man page from shellcheck.1.md. If the pandoc
-- command is not found, this will fail with an error message:
...
...
@@ -35,9 +27,10 @@ main = defaultMainWithHooks myHooks
--
myPreSDist
::
Args
->
SDistFlags
->
IO
HookedBuildInfo
myPreSDist
_
_
=
do
putStrLn
"Building the man page..."
putStrLn
"Building the man page
(shellcheck.1) with pandoc
..."
putStrLn
pandoc_cmd
callCommand
pandoc_cmd
result
<-
system
pandoc_cmd
putStrLn
$
"pandoc exited with "
++
show
result
return
emptyHookedBuildInfo
where
pandoc_cmd
=
"pandoc -s -t man shellcheck.1.md -o shellcheck.1"
ShellCheck.cabal
浏览文件 @
d473fb88
...
...
@@ -44,7 +44,9 @@ library
mtl >= 2.2.1,
parsec,
regex-tdfa,
QuickCheck >= 2.7.4
QuickCheck >= 2.7.4,
-- When cabal supports it, move this to setup-depends:
process
exposed-modules:
ShellCheck.AST
ShellCheck.ASTLib
...
...
@@ -87,7 +89,6 @@ test-suite test-shellcheck
mtl >= 2.2.1,
parsec,
regex-tdfa,
QuickCheck >= 2.7.4,
process >= 1.2.0.0
QuickCheck >= 2.7.4
main-is: test/shellcheck.hs
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录