首页 > 其他分享 >es ctags for code on win

es ctags for code on win

时间:2023-06-21 16:14:19浏览次数:34  
标签:xml code dist theGrokRoot source Path theTomcatRoot ctags es

setup

# dep: tar, 7z, pwsh, java

$theGrokRoot="D:/sevtest/opengrok"

$theTomcatRoot="D:/sevtest/tomcat"

$theGrokFile="./opengrok-1.12.11.tar.gz"
$theTomcatFile="./apache-tomcat-10.1.8.tar.gz"

#===============================================================================
# make root
#===============================================================================
New-Item -Path @($theGrokRoot,$theTomcatRoot) -ItemType Directory

#===============================================================================
# extract grok
#===============================================================================
cd $theGrokRoot

New-Item -Path @('src','data','dist','etc','log') -ItemType Directory

cd -

tar -C $theGrokRoot/dist --strip-components=1 -xzf $theGrokFile


#===============================================================================
# copy log property
#===============================================================================
Copy-Item -Path $theGrokRoot/dist/doc/logging.properties $theGrokRoot/etc/logging.properties


#===============================================================================
# extract Tomcat
#===============================================================================
tar -C $theTomcatRoot/ --strip-components=1 -xzf $theTomcatFile

#===============================================================================
# extract web page source
#===============================================================================
$webAppSource=$theTomcatRoot+"/webapps/source"

New-Item -Path @($webAppSource) -ItemType Directory

$inputSource=$theGrokRoot + "/dist/lib/source.war"
$sourceExtractPathOption="-o" + $webAppSource
7z x $inputSource $sourceExtractPathOption


#===============================================================================
# edit web.xml
#===============================================================================
$webConfig=$theTomcatRoot + "/webapps/source/WEB-INF/web.xml"
$fromString="/var/opengrok/etc/configuration.xml"
$toString=$theGrokRoot + "/etc/configuration.xml"
(Get-Content $webConfig).replace($fromString, $toString) | Set-Content $webConfig

Get-Content $theTomcatRoot/webapps/source/WEB-INF/web.xml

start tom

$theTomcatRoot="D:/sevtest/tomcat"


$env:CATALINA_HOME=$theTomcatRoot
$tomcatStartFile=$theTomcatRoot+"/bin/startup.bat"
echo $tomcatStartFile

cmd.exe -/c $tomcatStartFile

create index

$theGrokRoot="D:\sevtest\opengrok"

# universal ctags.exe is in current directory

$CurrentDirectory = Get-Location
$CurrentDirectoryString=Convert-Path -LiteralPath $CurrentDirectory
$absRootToUniversalCtags=$CurrentDirectoryString + "\ctags"


cmd.exe -/c java -jar $theGrokRoot\dist\lib\opengrok.jar -c $absRootToUniversalCtags -s $theGrokRoot\src -d $theGrokRoot\data -P -S -G -W $theGrokRoot\etc\configuration.xml

shut tom

$theTomcatRoot="D:/sevtest/tomcat"


$env:CATALINA_HOME=$theTomcatRoot
$tomcatShutdownFile=$theTomcatRoot+"/bin/shutdown.bat"
echo $tomcatShutdownFile

cmd.exe -/c $tomcatShutdownFile

127.0.0.1:8080/source

pitfall

missing configuration.xml

create index, the file will be created

标签:xml,code,dist,theGrokRoot,source,Path,theTomcatRoot,ctags,es
From: https://www.cnblogs.com/Searchor/p/17496497.html

相关文章

  • kubernetes Headless Services
    HeadlessServices介绍有时不需要或不想要负载均衡,以及单独的ServiceIP。遇到这种情况,可以通过显式指定ClusterIP(spec.clusterIP)的值为"None"来创建HeadlessService。你可以使用一个HeadlessService与其他服务发现机制进行接口,而不必与Kubernetes的实现捆绑在一起......
  • 如何解决 vscode exe does not exist 的问题
    问题一:使用vscode运行go时,提示需要launch.json文件需配置解决方法:在vscode插件搜索coderunner,然后安装问题二:E:\go\goWorkspace\src\GoProjects2>gorunmain.goexec:"C:\\Users\\向键雄\\AppData\\Local\\Temp\\go-build3787382914\\b001\\exe\\main":filedo......
  • ant design vue的customRender()方法中使用$createElement提示undefined
    antdesignvue的customRender()方法中使用$createElement提示undefined报错信息如下:TypeError:Cannotreadpropertiesofundefined(reading'$createElement')原因:如果index.vue文件中是从另一个columns.js的文件中引用的列配置,在columns.js文件中的customRender()方法中使......
  • wireshark如何增加一个注释列
    wireshakk简称wsws已经有了注释功能,但是不好用。我们要将注释内容以列的方式表示,增加可读性。1.找到你要注释的数据包右键选择分组注释,填写注释内容2.在列表首栏右键选择列配置,如下图所示 点击加号,然后设置为如下图的配置  配置完成点击确定效果展示  你也可以用类似方法定义......
  • [Leetcode] 0009. 回文数
    9.回文数点击上方,跳转至Leetcode题目描述给你一个整数x,如果x是一个回文整数,返回true;否则,返回false。回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。例如,121是回文,而123不是。 示例1:输入:x=121输出:true示例 2:输入:x=-121输出:false解释:......
  • [Leetcode] 0013. 罗马数字转整数
    13.罗马数字转整数点击上方,跳转至leetcode题目描述罗马数字包含以下七种字符: I, V, X, L,C,D 和 M。字符数值I1V5X10L50C100D500M1000例如,罗马数字2写......
  • [Leetcode] 0014. 最长公共前缀
    14.最长公共前缀点击上方,跳转至Leetcode题目描述编写一个函数来查找字符串数组中的最长公共前缀。如果不存在公共前缀,返回空字符串 ""。 示例1:输入:strs=["flower","flow","flight"]输出:"fl"示例2:输入:strs=["dog","racecar","car"]输出......
  • [Leetcode] 0020. 有效的括号
    20.有效的括号点击上方,跳转至leetcode题目描述给定一个只包括'(',')','{','}','[',']' 的字符串s,判断字符串是否有效。有效字符串需满足:左括号必须用相同类型的右括号闭合。左括号必须以正确的顺序闭合。每个右括号都有一个对应的相同类型的左括号。 示例1:输入:s="......
  • 使用presto 进行跨库数据对比
     明细+汇总 1SELECT2concat(3'selecta.*from('4,concat('',array_join(TRANSFORM(table_catalog_schema,_->concat('selectid,map(array[',column_name_str,'],split(',array_join(TRANSFORM(column_nam......
  • [Leetcode] 0724. 寻找数组的中心下标
    724.寻找数组的中心下标点击上方,跳转至leetcode题目描述给你一个整数数组 nums,请计算数组的中心下标。数组中心下标是数组的一个下标,其左侧所有元素相加的和等于右侧所有元素相加的和。如果中心下标位于数组最左端,那么左侧数之和视为0,因为在下标的左侧不存在元素。......