-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.xml
102 lines (48 loc) · 101 KB
/
search.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>应用列表</title>
<link href="/2023/05/01/Application/Application/"/>
<url>/2023/05/01/Application/Application/</url>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><p><a href="%E7%A7%8B%E5%88%80%E9%B1%BC%E7%BB%BF%E8%89%B2%E7%B2%BE%E7%AE%80%E7%89%88.exe">秋刀鱼绿色精简版</a><br><a href="%E6%BF%80%E6%B4%BB%E5%B7%A5%E5%85%B7.zip">微软 激活工具</a><br><a href="%E8%99%9A%E6%8B%9F%E5%85%89%E9%A9%B1.exe">微软 虚拟光驱</a><br><a href="Hash.exe">文件校验工具 Hash</a><br><a href="Captura-Setup.exe">录屏工具 Captura</a><br><a href="UltraEdit_v27.00.0.54_x64_zh-CN.7z">UltraEdit_v27.00.0.54_x64_zh-CN</a></p>]]></content>
<tags>
<tag> 应用 </tag>
</tags>
</entry>
<entry>
<title>如何在Windows环境实现make命令</title>
<link href="/2023/02/16/%E5%A6%82%E4%BD%95%E5%9C%A8Windows%E4%B8%8A%E9%85%8D%E7%BD%AE%E5%AE%9E%E7%8E%B0make%E5%91%BD%E4%BB%A4/"/>
<url>/2023/02/16/%E5%A6%82%E4%BD%95%E5%9C%A8Windows%E4%B8%8A%E9%85%8D%E7%BD%AE%E5%AE%9E%E7%8E%B0make%E5%91%BD%E4%BB%A4/</url>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><h1 id="简要说明实现过程"><a href="#简要说明实现过程" class="headerlink" title="简要说明实现过程"></a>简要说明实现过程</h1><pre><code>在官网下载.tar.gz格式的二进制文件,在Cygwin环境中编译出make,再将make命令所在文件夹移到windows环境中,同时make命令的执行依赖cygwin1.dll文件,将/bin/下的cygwin1.dll文件复制一份到make命令的文件中,然后再将make命令所在文件夹的路径添加到电脑的环境变量中,打开cmd窗口,执行 make -v,正常输出显示make的版本信息。</code></pre><h1 id="编译过程"><a href="#编译过程" class="headerlink" title="编译过程"></a>编译过程</h1><pre><code>./configuremkaemake install</code></pre>]]></content>
<tags>
<tag> windows </tag>
</tags>
</entry>
<entry>
<title>Cygwin安装与配置</title>
<link href="/2023/02/16/Cygwin/Cygwin%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AE/"/>
<url>/2023/02/16/Cygwin/Cygwin%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AE/</url>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><h1 id="安装Cygwi"><a href="#安装Cygwi" class="headerlink" title="安装Cygwi"></a>安装Cygwi</h1><h2 id="基本选项"><a href="#基本选项" class="headerlink" title="基本选项"></a>基本选项</h2><p>官网链接:<a href="https://www.cygwin.com/install.html">https://www.cygwin.com/install.html</a><br>选择通过网络安装<br>选择root目录,安装用户选择仅个人<br>选择安装的包的路径<br>使用系统代理,选择下载源如中科大的或阿里云等国内下载源</p><h2 id="安装工具选择"><a href="#安装工具选择" class="headerlink" title="安装工具选择"></a>安装工具选择</h2><p>binutils,<br>gcc-core,<br>gdb,<br>mingw64-i686-gcc-core,<br>make(必装)</p><p>还有的如:<br>openssh,<br>vim,<br>tmux,<br>git,<br>wget,<br>curl,<br>php</p><h1 id="配置apt-cyg"><a href="#配置apt-cyg" class="headerlink" title="配置apt-cyg"></a>配置apt-cyg</h1><p>用记事本创建一个名为apt-cyg的文件,复制粘贴进去如下内容,并且文本写完后,用vscode打开,把windows下的换行符CRLF改成linux下的LF<br>接下来,把刚刚的apt-cyg文件剪贴到Cygwin安装目录的bin文件夹里</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br><span class="line">422</span><br><span class="line">423</span><br><span class="line">424</span><br><span class="line">425</span><br><span class="line">426</span><br><span class="line">427</span><br><span class="line">428</span><br><span class="line">429</span><br><span class="line">430</span><br><span class="line">431</span><br><span class="line">432</span><br><span class="line">433</span><br><span class="line">434</span><br><span class="line">435</span><br><span class="line">436</span><br><span class="line">437</span><br><span class="line">438</span><br><span class="line">439</span><br><span class="line">440</span><br><span class="line">441</span><br><span class="line">442</span><br><span class="line">443</span><br><span class="line">444</span><br><span class="line">445</span><br><span class="line">446</span><br><span class="line">447</span><br><span class="line">448</span><br><span class="line">449</span><br><span class="line">450</span><br><span class="line">451</span><br><span class="line">452</span><br><span class="line">453</span><br><span class="line">454</span><br><span class="line">455</span><br><span class="line">456</span><br><span class="line">457</span><br><span class="line">458</span><br><span class="line">459</span><br><span class="line">460</span><br><span class="line">461</span><br><span class="line">462</span><br><span class="line">463</span><br><span class="line">464</span><br><span class="line">465</span><br><span class="line">466</span><br><span class="line">467</span><br><span class="line">468</span><br><span class="line">469</span><br><span class="line">470</span><br><span class="line">471</span><br><span class="line">472</span><br><span class="line">473</span><br><span class="line">474</span><br><span class="line">475</span><br><span class="line">476</span><br><span class="line">477</span><br><span class="line">478</span><br><span class="line">479</span><br><span class="line">480</span><br><span class="line">481</span><br><span class="line">482</span><br><span class="line">483</span><br><span class="line">484</span><br><span class="line">485</span><br><span class="line">486</span><br><span class="line">487</span><br><span class="line">488</span><br><span class="line">489</span><br><span class="line">490</span><br><span class="line">491</span><br><span class="line">492</span><br><span class="line">493</span><br><span class="line">494</span><br><span class="line">495</span><br><span class="line">496</span><br><span class="line">497</span><br><span class="line">498</span><br><span class="line">499</span><br><span class="line">500</span><br><span class="line">501</span><br><span class="line">502</span><br><span class="line">503</span><br><span class="line">504</span><br><span class="line">505</span><br><span class="line">506</span><br><span class="line">507</span><br><span class="line">508</span><br><span class="line">509</span><br><span class="line">510</span><br><span class="line">511</span><br><span class="line">512</span><br><span class="line">513</span><br><span class="line">514</span><br><span class="line">515</span><br><span class="line">516</span><br><span class="line">517</span><br><span class="line">518</span><br><span class="line">519</span><br><span class="line">520</span><br><span class="line">521</span><br><span class="line">522</span><br><span class="line">523</span><br><span class="line">524</span><br><span class="line">525</span><br><span class="line">526</span><br><span class="line">527</span><br><span class="line">528</span><br><span class="line">529</span><br><span class="line">530</span><br><span class="line">531</span><br><span class="line">532</span><br><span class="line">533</span><br><span class="line">534</span><br><span class="line">535</span><br><span class="line">536</span><br><span class="line">537</span><br><span class="line">538</span><br><span class="line">539</span><br><span class="line">540</span><br><span class="line">541</span><br><span class="line">542</span><br><span class="line">543</span><br><span class="line">544</span><br><span class="line">545</span><br><span class="line">546</span><br><span class="line">547</span><br><span class="line">548</span><br><span class="line">549</span><br><span class="line">550</span><br><span class="line">551</span><br><span class="line">552</span><br><span class="line">553</span><br><span class="line">554</span><br><span class="line">555</span><br><span class="line">556</span><br><span class="line">557</span><br><span class="line">558</span><br><span class="line">559</span><br><span class="line">560</span><br><span class="line">561</span><br><span class="line">562</span><br><span class="line">563</span><br><span class="line">564</span><br><span class="line">565</span><br><span class="line">566</span><br><span class="line">567</span><br><span class="line">568</span><br><span class="line">569</span><br><span class="line">570</span><br><span class="line">571</span><br><span class="line">572</span><br><span class="line">573</span><br><span class="line">574</span><br><span class="line">575</span><br><span class="line">576</span><br><span class="line">577</span><br><span class="line">578</span><br><span class="line">579</span><br><span class="line">580</span><br><span class="line">581</span><br><span class="line">582</span><br><span class="line">583</span><br><span class="line">584</span><br><span class="line">585</span><br><span class="line">586</span><br><span class="line">587</span><br><span class="line">588</span><br><span class="line">589</span><br><span class="line">590</span><br><span class="line">591</span><br><span class="line">592</span><br><span class="line">593</span><br><span class="line">594</span><br><span class="line">595</span><br><span class="line">596</span><br><span class="line">597</span><br><span class="line">598</span><br><span class="line">599</span><br><span class="line">600</span><br><span class="line">601</span><br><span class="line">602</span><br><span class="line">603</span><br><span class="line">604</span><br><span class="line">605</span><br><span class="line">606</span><br><span class="line">607</span><br><span class="line">608</span><br><span class="line">609</span><br><span class="line">610</span><br><span class="line">611</span><br><span class="line">612</span><br><span class="line">613</span><br><span class="line">614</span><br><span class="line">615</span><br><span class="line">616</span><br><span class="line">617</span><br><span class="line">618</span><br><span class="line">619</span><br><span class="line">620</span><br><span class="line">621</span><br><span class="line">622</span><br><span class="line">623</span><br><span class="line">624</span><br><span class="line">625</span><br><span class="line">626</span><br><span class="line">627</span><br><span class="line">628</span><br><span class="line">629</span><br><span class="line">630</span><br><span class="line">631</span><br><span class="line">632</span><br><span class="line">633</span><br><span class="line">634</span><br><span class="line">635</span><br><span class="line">636</span><br><span class="line">637</span><br><span class="line">638</span><br><span class="line">639</span><br><span class="line">640</span><br><span class="line">641</span><br><span class="line">642</span><br><span class="line">643</span><br><span class="line">644</span><br><span class="line">645</span><br><span class="line">646</span><br><span class="line">647</span><br><span class="line">648</span><br><span class="line">649</span><br><span class="line">650</span><br><span class="line">651</span><br><span class="line">652</span><br><span class="line">653</span><br><span class="line">654</span><br><span class="line">655</span><br><span class="line">656</span><br><span class="line">657</span><br><span class="line">658</span><br><span class="line">659</span><br><span class="line">660</span><br><span class="line">661</span><br><span class="line">662</span><br><span class="line">663</span><br><span class="line">664</span><br><span class="line">665</span><br><span class="line">666</span><br><span class="line">667</span><br><span class="line">668</span><br><span class="line">669</span><br><span class="line">670</span><br><span class="line">671</span><br><span class="line">672</span><br><span class="line">673</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#!/bin/bash</span></span><br><span class="line"><span class="comment"># apt-cyg: install tool for Cygwin similar to debian apt-get</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># The MIT License (MIT)</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># Copyright (c) 2013 Trans-code Design</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># Permission is hereby granted, free of charge, to any person obtaining a copy</span></span><br><span class="line"><span class="comment"># of this software and associated documentation files (the "Software"), to deal</span></span><br><span class="line"><span class="comment"># in the Software without restriction, including without limitation the rights</span></span><br><span class="line"><span class="comment"># to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></span><br><span class="line"><span class="comment"># copies of the Software, and to permit persons to whom the Software is</span></span><br><span class="line"><span class="comment"># furnished to do so, subject to the following conditions:</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># The above copyright notice and this permission notice shall be included in</span></span><br><span class="line"><span class="comment"># all copies or substantial portions of the Software.</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></span><br><span class="line"><span class="comment"># IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></span><br><span class="line"><span class="comment"># FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></span><br><span class="line"><span class="comment"># AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></span><br><span class="line"><span class="comment"># LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></span><br><span class="line"><span class="comment"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span></span><br><span class="line"><span class="comment"># THE SOFTWARE.</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> [ <span class="variable">${BASH_VERSINFO}</span><span class="variable">${BASH_VERSINFO[1]}</span> -lt 42 ]</span><br><span class="line"><span class="keyword">then</span></span><br><span class="line"> <span class="built_in">echo</span> <span class="string">'Bash version 4.2+ required'</span></span><br><span class="line"> <span class="built_in">exit</span></span><br><span class="line"><span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line">usage=<span class="string">"\</span></span><br><span class="line"><span class="string">NAME</span></span><br><span class="line"><span class="string"> apt-cyg - package manager utility</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">SYNOPSIS</span></span><br><span class="line"><span class="string"> apt-cyg [operation] [options] [targets]</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">DESCRIPTION</span></span><br><span class="line"><span class="string"> apt-cyg is a package management utility that tracks installed packages on a</span></span><br><span class="line"><span class="string"> Cygwin system. Invoking apt-cyg involves specifying an operation with any</span></span><br><span class="line"><span class="string"> potential options and targets to operate on. A target is usually a package</span></span><br><span class="line"><span class="string"> name, file name, URL, or a search string. Targets can be provided as command</span></span><br><span class="line"><span class="string"> line arguments.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">OPERATIONS</span></span><br><span class="line"><span class="string"> install</span></span><br><span class="line"><span class="string"> Install package(s).</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> remove</span></span><br><span class="line"><span class="string"> Remove package(s) from the system.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> update</span></span><br><span class="line"><span class="string"> Download a fresh copy of the master package list (setup.ini) from the</span></span><br><span class="line"><span class="string"> server defined in setup.rc.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> download</span></span><br><span class="line"><span class="string"> Retrieve package(s) from the server, but do not install/upgrade anything.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> show</span></span><br><span class="line"><span class="string"> Display information on given package(s).</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> depends</span></span><br><span class="line"><span class="string"> Produce a dependency tree for a package.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> rdepends</span></span><br><span class="line"><span class="string"> Produce a tree of packages that depend on the named package.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> list</span></span><br><span class="line"><span class="string"> Search each locally-installed package for names that match regexp. If no</span></span><br><span class="line"><span class="string"> package names are provided in the command line, all installed packages will</span></span><br><span class="line"><span class="string"> be queried.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> listall</span></span><br><span class="line"><span class="string"> This will search each package in the master package list (setup.ini) for</span></span><br><span class="line"><span class="string"> names that match regexp.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> category</span></span><br><span class="line"><span class="string"> Display all packages that are members of a named category.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> listfiles</span></span><br><span class="line"><span class="string"> List all files owned by a given package. Multiple packages can be specified</span></span><br><span class="line"><span class="string"> on the command line.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> search</span></span><br><span class="line"><span class="string"> Search for downloaded packages that own the specified file(s). The path can</span></span><br><span class="line"><span class="string"> be relative or absolute, and one or more files can be specified.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> searchall</span></span><br><span class="line"><span class="string"> Search cygwin.com to retrieve file information about packages. The provided</span></span><br><span class="line"><span class="string"> target is considered to be a filename and searchall will return the</span></span><br><span class="line"><span class="string"> package(s) which contain this file.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> mirror</span></span><br><span class="line"><span class="string"> Set the mirror; a full URL to a location where the database, packages, and</span></span><br><span class="line"><span class="string"> signatures for this repository can be found. If no URL is provided, display</span></span><br><span class="line"><span class="string"> current mirror.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> cache</span></span><br><span class="line"><span class="string"> Set the package cache directory. If a file is not found in cache directory,</span></span><br><span class="line"><span class="string"> it will be downloaded. Unix and Windows forms are accepted, as well as</span></span><br><span class="line"><span class="string"> absolute or regular paths. If no directory is provided, display current</span></span><br><span class="line"><span class="string"> cache.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">OPTIONS</span></span><br><span class="line"><span class="string"> --nodeps</span></span><br><span class="line"><span class="string"> Specify this option to skip all dependency checks.</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> --version</span></span><br><span class="line"><span class="string"> Display version and exit.</span></span><br><span class="line"><span class="string">"</span></span><br><span class="line"></span><br><span class="line">version=<span class="string">"\</span></span><br><span class="line"><span class="string">apt-cyg version 1</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">The MIT License (MIT)</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">Copyright (c) 2005-9 Stephen Jungels</span></span><br><span class="line"><span class="string">"</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> wget {</span><br><span class="line"> <span class="keyword">if</span> <span class="built_in">command</span> wget -h &>/dev/null</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> <span class="built_in">command</span> wget <span class="string">"<span class="variable">$@</span>"</span></span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> warn wget is not installed, using lynx as fallback</span><br><span class="line"> <span class="built_in">set</span> <span class="string">"<span class="variable">${*: -1}</span>"</span></span><br><span class="line"> lynx -<span class="built_in">source</span> <span class="string">"<span class="variable">$1</span>"</span> > <span class="string">"<span class="variable">${1##*/}</span>"</span></span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> find-workspace {</span><br><span class="line"> <span class="comment"># default working directory and mirror</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># work wherever setup worked last, if possible</span></span><br><span class="line"> cache=$(awk <span class="string">'</span></span><br><span class="line"><span class="string"> BEGIN {</span></span><br><span class="line"><span class="string"> RS = "\n\\<"</span></span><br><span class="line"><span class="string"> FS = "\n\t"</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> $1 == "last-cache" {</span></span><br><span class="line"><span class="string"> print $2</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> '</span> /etc/setup/setup.rc)</span><br><span class="line"></span><br><span class="line"> mirror=$(awk <span class="string">'</span></span><br><span class="line"><span class="string"> /last-mirror/ {</span></span><br><span class="line"><span class="string"> getline</span></span><br><span class="line"><span class="string"> print $1</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> '</span> /etc/setup/setup.rc)</span><br><span class="line"> mirrordir=$(sed <span class="string">'</span></span><br><span class="line"><span class="string"> s / %2f g</span></span><br><span class="line"><span class="string"> s : %3a g</span></span><br><span class="line"><span class="string"> '</span> <<< <span class="string">"<span class="variable">$mirror</span>"</span>)</span><br><span class="line"></span><br><span class="line"> <span class="built_in">mkdir</span> -p <span class="string">"<span class="variable">$cache</span>/<span class="variable">$mirrordir</span>/<span class="variable">$arch</span>"</span></span><br><span class="line"> <span class="built_in">cd</span> <span class="string">"<span class="variable">$cache</span>/<span class="variable">$mirrordir</span>/<span class="variable">$arch</span>"</span></span><br><span class="line"> <span class="keyword">if</span> [ -e setup.ini ]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> <span class="built_in">return</span> 0</span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> get-setup</span><br><span class="line"> <span class="built_in">return</span> 1</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> get-setup {</span><br><span class="line"> <span class="built_in">touch</span> setup.ini</span><br><span class="line"> <span class="built_in">mv</span> setup.ini setup.ini-save</span><br><span class="line"> wget -N <span class="variable">$mirror</span>/<span class="variable">$arch</span>/setup.bz2</span><br><span class="line"> <span class="keyword">if</span> [ -e setup.bz2 ]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> bunzip2 setup.bz2</span><br><span class="line"> <span class="built_in">mv</span> setup setup.ini</span><br><span class="line"> <span class="built_in">echo</span> Updated setup.ini</span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> <span class="built_in">echo</span> Error updating setup.ini, reverting</span><br><span class="line"> <span class="built_in">mv</span> setup.ini-save setup.ini</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> check-packages {</span><br><span class="line"> <span class="keyword">if</span> [[ <span class="variable">$pks</span> ]]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> <span class="built_in">return</span> 0</span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> <span class="built_in">echo</span> No packages found.</span><br><span class="line"> <span class="built_in">return</span> 1</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> warn {</span><br><span class="line"> <span class="built_in">printf</span> <span class="string">'\e[1;31m%s\e[m\n'</span> <span class="string">"$*"</span> >&2</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-update {</span><br><span class="line"> <span class="keyword">if</span> find-workspace</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> get-setup</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-category {</span><br><span class="line"> check-packages</span><br><span class="line"> find-workspace</span><br><span class="line"> <span class="keyword">for</span> pkg <span class="keyword">in</span> <span class="string">"<span class="variable">${pks[@]}</span>"</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> awk <span class="string">'</span></span><br><span class="line"><span class="string"> $1 == "@" {</span></span><br><span class="line"><span class="string"> pck = $2</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> $1 == "category:" && $0 ~ query {</span></span><br><span class="line"><span class="string"> print pck</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> '</span> query=<span class="string">"<span class="variable">$pks</span>"</span> setup.ini</span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-list {</span><br><span class="line"> <span class="built_in">local</span> sbq</span><br><span class="line"> <span class="keyword">for</span> pkg <span class="keyword">in</span> <span class="string">"<span class="variable">${pks[@]}</span>"</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> <span class="built_in">let</span> sbq++ && <span class="built_in">echo</span></span><br><span class="line"> awk <span class="string">'NR>1 && $1~pkg && $0=$1'</span> pkg=<span class="string">"<span class="variable">$pkg</span>"</span> /etc/setup/installed.db</span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line"> <span class="built_in">let</span> sbq && <span class="built_in">return</span></span><br><span class="line"> awk <span class="string">'NR>1 && $0=$1'</span> /etc/setup/installed.db</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-listall {</span><br><span class="line"> check-packages</span><br><span class="line"> find-workspace</span><br><span class="line"> <span class="built_in">local</span> sbq</span><br><span class="line"> <span class="keyword">for</span> pkg <span class="keyword">in</span> <span class="string">"<span class="variable">${pks[@]}</span>"</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> <span class="built_in">let</span> sbq++ && <span class="built_in">echo</span></span><br><span class="line"> awk <span class="string">'$1~pkg && $0=$1'</span> RS=<span class="string">'\n\n@ '</span> FS=<span class="string">'\n'</span> pkg=<span class="string">"<span class="variable">$pkg</span>"</span> setup.ini</span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-listfiles {</span><br><span class="line"> check-packages</span><br><span class="line"> find-workspace</span><br><span class="line"> <span class="built_in">local</span> pkg sbq</span><br><span class="line"> <span class="keyword">for</span> pkg <span class="keyword">in</span> <span class="string">"<span class="variable">${pks[@]}</span>"</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> (( sbq++ )) && <span class="built_in">echo</span></span><br><span class="line"> <span class="keyword">if</span> [ ! -e /etc/setup/<span class="string">"<span class="variable">$pkg</span>"</span>.lst.gz ]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> download <span class="string">"<span class="variable">$pkg</span>"</span></span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"> gzip -<span class="built_in">cd</span> /etc/setup/<span class="string">"<span class="variable">$pkg</span>"</span>.lst.gz</span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-show {</span><br><span class="line"> find-workspace</span><br><span class="line"> check-packages</span><br><span class="line"> <span class="keyword">for</span> pkg <span class="keyword">in</span> <span class="string">"<span class="variable">${pks[@]}</span>"</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> (( notfirst++ )) && <span class="built_in">echo</span></span><br><span class="line"> awk <span class="string">'</span></span><br><span class="line"><span class="string"> $1 == query {</span></span><br><span class="line"><span class="string"> print</span></span><br><span class="line"><span class="string"> fd++</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> END {</span></span><br><span class="line"><span class="string"> if (! fd)</span></span><br><span class="line"><span class="string"> print "Unable to locate package " query</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> '</span> RS=<span class="string">'\n\n@ '</span> FS=<span class="string">'\n'</span> query=<span class="string">"<span class="variable">$pkg</span>"</span> setup.ini</span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-depends {</span><br><span class="line"> find-workspace</span><br><span class="line"> check-packages</span><br><span class="line"> <span class="keyword">for</span> pkg <span class="keyword">in</span> <span class="string">"<span class="variable">${pks[@]}</span>"</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> awk <span class="string">'</span></span><br><span class="line"><span class="string"> @include "join"</span></span><br><span class="line"><span class="string"> $1 == "@" {</span></span><br><span class="line"><span class="string"> apg = $2</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> $1 == "requires:" {</span></span><br><span class="line"><span class="string"> for (z=2; z<=NF; z++)</span></span><br><span class="line"><span class="string"> reqs[apg][z-1] = $z</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> END {</span></span><br><span class="line"><span class="string"> prpg(ENVIRON["pkg"])</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> function smartmatch(small, large, values) {</span></span><br><span class="line"><span class="string"> for (each in large)</span></span><br><span class="line"><span class="string"> values[large[each]]</span></span><br><span class="line"><span class="string"> return small in values</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> function prpg(fpg) {</span></span><br><span class="line"><span class="string"> if (smartmatch(fpg, spath)) return</span></span><br><span class="line"><span class="string"> spath[length(spath)+1] = fpg</span></span><br><span class="line"><span class="string"> print join(spath, 1, length(spath), " > ")</span></span><br><span class="line"><span class="string"> if (isarray(reqs[fpg]))</span></span><br><span class="line"><span class="string"> for (each in reqs[fpg])</span></span><br><span class="line"><span class="string"> prpg(reqs[fpg][each])</span></span><br><span class="line"><span class="string"> delete spath[length(spath)]</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> '</span> setup.ini</span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-rdepends {</span><br><span class="line"> find-workspace</span><br><span class="line"> <span class="keyword">for</span> pkg <span class="keyword">in</span> <span class="string">"<span class="variable">${pks[@]}</span>"</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> awk <span class="string">'</span></span><br><span class="line"><span class="string"> @include "join"</span></span><br><span class="line"><span class="string"> $1 == "@" {</span></span><br><span class="line"><span class="string"> apg = $2</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> $1 == "requires:" {</span></span><br><span class="line"><span class="string"> for (z=2; z<=NF; z++)</span></span><br><span class="line"><span class="string"> reqs[$z][length(reqs[$z])+1] = apg</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> END {</span></span><br><span class="line"><span class="string"> prpg(ENVIRON["pkg"])</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> function smartmatch(small, large, values) {</span></span><br><span class="line"><span class="string"> for (each in large)</span></span><br><span class="line"><span class="string"> values[large[each]]</span></span><br><span class="line"><span class="string"> return small in values</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> function prpg(fpg) {</span></span><br><span class="line"><span class="string"> if (smartmatch(fpg, spath)) return</span></span><br><span class="line"><span class="string"> spath[length(spath)+1] = fpg</span></span><br><span class="line"><span class="string"> print join(spath, 1, length(spath), " < ")</span></span><br><span class="line"><span class="string"> if (isarray(reqs[fpg]))</span></span><br><span class="line"><span class="string"> for (each in reqs[fpg])</span></span><br><span class="line"><span class="string"> prpg(reqs[fpg][each])</span></span><br><span class="line"><span class="string"> delete spath[length(spath)]</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> '</span> setup.ini</span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-download {</span><br><span class="line"> check-packages</span><br><span class="line"> find-workspace</span><br><span class="line"> <span class="built_in">local</span> pkg sbq</span><br><span class="line"> <span class="keyword">for</span> pkg <span class="keyword">in</span> <span class="string">"<span class="variable">${pks[@]}</span>"</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> (( sbq++ )) && <span class="built_in">echo</span></span><br><span class="line"> download <span class="string">"<span class="variable">$pkg</span>"</span></span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> download {</span><br><span class="line"> <span class="built_in">local</span> pkg digest digactual</span><br><span class="line"> pkg=<span class="variable">$1</span></span><br><span class="line"> <span class="comment"># look for package and save desc file</span></span><br><span class="line"></span><br><span class="line"> awk <span class="string">'$1 == pc'</span> RS=<span class="string">'\n\n@ '</span> FS=<span class="string">'\n'</span> pc=<span class="variable">$pkg</span> setup.ini > desc</span><br><span class="line"> <span class="keyword">if</span> [ ! -s desc ]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> <span class="built_in">echo</span> Unable to locate package <span class="variable">$pkg</span></span><br><span class="line"> <span class="built_in">exit</span> 1</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># download and unpack the bz2 or xz file</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># pick the latest version, which comes first</span></span><br><span class="line"> <span class="built_in">set</span> -- $(awk <span class="string">'$1 == "install:"'</span> desc)</span><br><span class="line"> <span class="keyword">if</span> (( ! <span class="variable">$#</span> ))</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> <span class="built_in">echo</span> <span class="string">'Could not find "install" in package description: obsolete package?'</span></span><br><span class="line"> <span class="built_in">exit</span> 1</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line"> dn=$(<span class="built_in">dirname</span> <span class="variable">$2</span>)</span><br><span class="line"> bn=$(<span class="built_in">basename</span> <span class="variable">$2</span>)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># check the md5</span></span><br><span class="line"> digest=<span class="variable">$4</span></span><br><span class="line"> <span class="keyword">case</span> <span class="variable">${#digest}</span> <span class="keyword">in</span></span><br><span class="line"> 32) <span class="built_in">hash</span>=<span class="built_in">md5sum</span> ;;</span><br><span class="line"> 128) <span class="built_in">hash</span>=<span class="built_in">sha512sum</span> ;;</span><br><span class="line"> <span class="keyword">esac</span></span><br><span class="line"> <span class="built_in">mkdir</span> -p <span class="string">"<span class="variable">$cache</span>/<span class="variable">$mirrordir</span>/<span class="variable">$dn</span>"</span></span><br><span class="line"> <span class="built_in">cd</span> <span class="string">"<span class="variable">$cache</span>/<span class="variable">$mirrordir</span>/<span class="variable">$dn</span>"</span></span><br><span class="line"> <span class="keyword">if</span> ! <span class="built_in">test</span> -e <span class="variable">$bn</span> || ! <span class="variable">$hash</span> -c <<< <span class="string">"<span class="variable">$digest</span> <span class="variable">$bn</span>"</span></span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> wget -O <span class="variable">$bn</span> <span class="variable">$mirror</span>/<span class="variable">$dn</span>/<span class="variable">$bn</span></span><br><span class="line"> <span class="variable">$hash</span> -c <<< <span class="string">"<span class="variable">$digest</span> <span class="variable">$bn</span>"</span> || <span class="built_in">exit</span></span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line"> tar tf <span class="variable">$bn</span> | gzip > /etc/setup/<span class="string">"<span class="variable">$pkg</span>"</span>.lst.gz</span><br><span class="line"> <span class="built_in">cd</span> ~-</span><br><span class="line"> <span class="built_in">mv</span> desc <span class="string">"<span class="variable">$cache</span>/<span class="variable">$mirrordir</span>/<span class="variable">$dn</span>"</span></span><br><span class="line"> <span class="built_in">echo</span> <span class="variable">$dn</span> <span class="variable">$bn</span> > /tmp/dwn</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-search {</span><br><span class="line"> check-packages</span><br><span class="line"> <span class="built_in">echo</span> Searching downloaded packages...</span><br><span class="line"> <span class="keyword">for</span> pkg <span class="keyword">in</span> <span class="string">"<span class="variable">${pks[@]}</span>"</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> key=$(<span class="built_in">type</span> -P <span class="string">"<span class="variable">$pkg</span>"</span> | sed s./..)</span><br><span class="line"> [[ <span class="variable">$key</span> ]] || key=<span class="variable">$pkg</span></span><br><span class="line"> <span class="keyword">for</span> manifest <span class="keyword">in</span> /etc/setup/*.lst.gz</span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> <span class="keyword">if</span> gzip -<span class="built_in">cd</span> <span class="variable">$manifest</span> | grep -q <span class="string">"<span class="variable">$key</span>"</span></span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> package=$(sed <span class="string">'</span></span><br><span class="line"><span class="string"> s,/etc/setup/,,</span></span><br><span class="line"><span class="string"> s,.lst.gz,,</span></span><br><span class="line"><span class="string"> '</span> <<< <span class="variable">$manifest</span>)</span><br><span class="line"> <span class="built_in">echo</span> <span class="variable">$package</span></span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-searchall {</span><br><span class="line"> <span class="built_in">cd</span> /tmp</span><br><span class="line"> <span class="keyword">for</span> pkg <span class="keyword">in</span> <span class="string">"<span class="variable">${pks[@]}</span>"</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> <span class="built_in">printf</span> -v qs <span class="string">'text=1&arch=%s&grep=%s'</span> <span class="variable">$arch</span> <span class="string">"<span class="variable">$pkg</span>"</span></span><br><span class="line"> wget -O matches cygwin.com/cgi-bin2/package-grep.cgi?<span class="string">"<span class="variable">$qs</span>"</span></span><br><span class="line"> awk <span class="string">'</span></span><br><span class="line"><span class="string"> NR == 1 {next}</span></span><br><span class="line"><span class="string"> mc[$1]++ {next}</span></span><br><span class="line"><span class="string"> /-debuginfo-/ {next}</span></span><br><span class="line"><span class="string"> /^cygwin32-/ {next}</span></span><br><span class="line"><span class="string"> {print $1}</span></span><br><span class="line"><span class="string"> '</span> FS=-[[:digit:]] matches</span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-install {</span><br><span class="line"> check-packages</span><br><span class="line"> find-workspace</span><br><span class="line"> <span class="built_in">local</span> pkg dn bn requires wr package sbq script</span><br><span class="line"> <span class="keyword">for</span> pkg <span class="keyword">in</span> <span class="string">"<span class="variable">${pks[@]}</span>"</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> grep -q <span class="string">"^<span class="variable">$pkg</span> "</span> /etc/setup/installed.db</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> <span class="built_in">echo</span> Package <span class="variable">$pkg</span> is already installed, skipping</span><br><span class="line"> <span class="built_in">continue</span></span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"> (( sbq++ )) && <span class="built_in">echo</span></span><br><span class="line"> <span class="built_in">echo</span> Installing <span class="variable">$pkg</span></span><br><span class="line"></span><br><span class="line"> download <span class="variable">$pkg</span></span><br><span class="line"> <span class="built_in">read</span> dn bn </tmp/dwn</span><br><span class="line"> <span class="built_in">echo</span> Unpacking...</span><br><span class="line"></span><br><span class="line"> <span class="built_in">cd</span> <span class="string">"<span class="variable">$cache</span>/<span class="variable">$mirrordir</span>/<span class="variable">$dn</span>"</span></span><br><span class="line"> tar -x -C / -f <span class="variable">$bn</span></span><br><span class="line"> <span class="comment"># update the package database</span></span><br><span class="line"></span><br><span class="line"> awk <span class="string">'</span></span><br><span class="line"><span class="string"> ins != 1 && pkg < $1 {</span></span><br><span class="line"><span class="string"> print pkg, bz, 0</span></span><br><span class="line"><span class="string"> ins = 1</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> 1</span></span><br><span class="line"><span class="string"> END {</span></span><br><span class="line"><span class="string"> if (ins != 1) print pkg, bz, 0</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> '</span> pkg=<span class="string">"<span class="variable">$pkg</span>"</span> bz=<span class="variable">$bn</span> /etc/setup/installed.db > /tmp/awk.$$</span><br><span class="line"> <span class="built_in">mv</span> /etc/setup/installed.db /etc/setup/installed.db-save</span><br><span class="line"> <span class="built_in">mv</span> /tmp/awk.$$ /etc/setup/installed.db</span><br><span class="line"></span><br><span class="line"> [ -v nodeps ] && <span class="built_in">continue</span></span><br><span class="line"> <span class="comment"># recursively install required packages</span></span><br><span class="line"></span><br><span class="line"> requires=$(awk <span class="string">'$1=="requires", $0=$2'</span> FS=<span class="string">': '</span> desc)</span><br><span class="line"> <span class="built_in">cd</span> ~-</span><br><span class="line"> wr=0</span><br><span class="line"> <span class="keyword">if</span> [[ <span class="variable">$requires</span> ]]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> <span class="built_in">echo</span> Package <span class="variable">$pkg</span> requires the following packages, installing:</span><br><span class="line"> <span class="built_in">echo</span> <span class="variable">$requires</span></span><br><span class="line"> <span class="keyword">for</span> package <span class="keyword">in</span> <span class="variable">$requires</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> <span class="keyword">if</span> grep -q <span class="string">"^<span class="variable">$package</span> "</span> /etc/setup/installed.db</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> <span class="built_in">echo</span> Package <span class="variable">$package</span> is already installed, skipping</span><br><span class="line"> <span class="built_in">continue</span></span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"> apt-cyg install --noscripts <span class="variable">$package</span> || (( wr++ ))</span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"> <span class="keyword">if</span> (( wr ))</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> <span class="built_in">echo</span> some required packages did not install, continuing</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># run all postinstall scripts</span></span><br><span class="line"></span><br><span class="line"> [ -v noscripts ] && <span class="built_in">continue</span></span><br><span class="line"> find /etc/postinstall -name <span class="string">'*.sh'</span> | <span class="keyword">while</span> <span class="built_in">read</span> script</span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> <span class="built_in">echo</span> Running <span class="variable">$script</span></span><br><span class="line"> <span class="variable">$script</span></span><br><span class="line"> <span class="built_in">mv</span> <span class="variable">$script</span> <span class="variable">$script</span>.<span class="keyword">done</span></span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line"> <span class="built_in">echo</span> Package <span class="variable">$pkg</span> installed</span><br><span class="line"></span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-remove {</span><br><span class="line"> check-packages</span><br><span class="line"> <span class="built_in">cd</span> /etc</span><br><span class="line"> cygcheck awk bash bunzip2 grep gzip <span class="built_in">mv</span> sed tar xz > setup/essential.lst</span><br><span class="line"> <span class="keyword">for</span> pkg <span class="keyword">in</span> <span class="string">"<span class="variable">${pks[@]}</span>"</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> ! grep -q <span class="string">"^<span class="variable">$pkg</span> "</span> setup/installed.db</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> <span class="built_in">echo</span> Package <span class="variable">$pkg</span> is not installed, skipping</span><br><span class="line"> <span class="built_in">continue</span></span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> [ ! -e setup/<span class="string">"<span class="variable">$pkg</span>"</span>.lst.gz ]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> warn Package manifest missing, cannot remove <span class="variable">$pkg</span>. Exiting</span><br><span class="line"> <span class="built_in">exit</span> 1</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"> gzip -dk setup/<span class="string">"<span class="variable">$pkg</span>"</span>.lst.gz</span><br><span class="line"> awk <span class="string">'</span></span><br><span class="line"><span class="string"> NR == FNR {</span></span><br><span class="line"><span class="string"> if ($NF) ess[$NF]</span></span><br><span class="line"><span class="string"> next</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> $NF in ess {</span></span><br><span class="line"><span class="string"> exit 1</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> '</span> FS=<span class="string">'[/\\\\]'</span> setup/{essential,<span class="variable">$pkg</span>}.lst</span><br><span class="line"> esn=$?</span><br><span class="line"> <span class="keyword">if</span> [ <span class="variable">$esn</span> = 0 ]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> <span class="built_in">echo</span> Removing <span class="variable">$pkg</span></span><br><span class="line"> <span class="keyword">if</span> [ -e preremove/<span class="string">"<span class="variable">$pkg</span>"</span>.sh ]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> preremove/<span class="string">"<span class="variable">$pkg</span>"</span>.sh</span><br><span class="line"> <span class="built_in">rm</span> preremove/<span class="string">"<span class="variable">$pkg</span>"</span>.sh</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"> <span class="built_in">mapfile</span> dt < setup/<span class="string">"<span class="variable">$pkg</span>"</span>.lst</span><br><span class="line"> <span class="keyword">for</span> each <span class="keyword">in</span> <span class="variable">${dt[*]}</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> [ -f /<span class="variable">$each</span> ] && <span class="built_in">rm</span> /<span class="variable">$each</span></span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line"> <span class="keyword">for</span> each <span class="keyword">in</span> <span class="variable">${dt[*]}</span></span><br><span class="line"> <span class="keyword">do</span></span><br><span class="line"> [ -d /<span class="variable">$each</span> ] && <span class="built_in">rmdir</span> --i /<span class="variable">$each</span></span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line"> <span class="built_in">rm</span> -f setup/<span class="string">"<span class="variable">$pkg</span>"</span>.lst.gz postinstall/<span class="string">"<span class="variable">$pkg</span>"</span>.sh.done</span><br><span class="line"> awk -i inplace <span class="string">'$1 != ENVIRON["pkg"]'</span> setup/installed.db</span><br><span class="line"> <span class="built_in">echo</span> Package <span class="variable">$pkg</span> removed</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"> <span class="built_in">rm</span> setup/<span class="string">"<span class="variable">$pkg</span>"</span>.lst</span><br><span class="line"> <span class="keyword">if</span> [ <span class="variable">$esn</span> = 1 ]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> warn apt-cyg cannot remove package <span class="variable">$pkg</span>, exiting</span><br><span class="line"> <span class="built_in">exit</span> 1</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line"> <span class="keyword">done</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-mirror {</span><br><span class="line"> <span class="keyword">if</span> [ <span class="string">"<span class="variable">$pks</span>"</span> ]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> awk -i inplace <span class="string">'</span></span><br><span class="line"><span class="string"> 1</span></span><br><span class="line"><span class="string"> /last-mirror/ {</span></span><br><span class="line"><span class="string"> getline</span></span><br><span class="line"><span class="string"> print "\t" pks</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> '</span> pks=<span class="string">"<span class="variable">$pks</span>"</span> /etc/setup/setup.rc</span><br><span class="line"> <span class="built_in">echo</span> Mirror <span class="built_in">set</span> to <span class="string">"<span class="variable">$pks</span>"</span>.</span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> awk <span class="string">'</span></span><br><span class="line"><span class="string"> /last-mirror/ {</span></span><br><span class="line"><span class="string"> getline</span></span><br><span class="line"><span class="string"> print $1</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> '</span> /etc/setup/setup.rc</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> apt-cache {</span><br><span class="line"> <span class="keyword">if</span> [ <span class="string">"<span class="variable">$pks</span>"</span> ]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> vas=$(cygpath -aw <span class="string">"<span class="variable">$pks</span>"</span>)</span><br><span class="line"> awk -i inplace <span class="string">'</span></span><br><span class="line"><span class="string"> 1</span></span><br><span class="line"><span class="string"> /last-cache/ {</span></span><br><span class="line"><span class="string"> getline</span></span><br><span class="line"><span class="string"> print "\t" vas</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> '</span> vas=<span class="string">"<span class="variable">${vas//\\/\\\\}</span>"</span> /etc/setup/setup.rc</span><br><span class="line"> <span class="built_in">echo</span> Cache <span class="built_in">set</span> to <span class="string">"<span class="variable">$vas</span>"</span>.</span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> awk <span class="string">'</span></span><br><span class="line"><span class="string"> /last-cache/ {</span></span><br><span class="line"><span class="string"> getline</span></span><br><span class="line"><span class="string"> print $1</span></span><br><span class="line"><span class="string"> }</span></span><br><span class="line"><span class="string"> '</span> /etc/setup/setup.rc</span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> [ -p /dev/stdin ]</span><br><span class="line"><span class="keyword">then</span></span><br><span class="line"> <span class="built_in">mapfile</span> -t pks</span><br><span class="line"><span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># process options</span></span><br><span class="line">until [ <span class="variable">$#</span> = 0 ]</span><br><span class="line"><span class="keyword">do</span></span><br><span class="line"> <span class="keyword">case</span> <span class="string">"<span class="variable">$1</span>"</span> <span class="keyword">in</span></span><br><span class="line"></span><br><span class="line"> --nodeps)</span><br><span class="line"> nodeps=1</span><br><span class="line"> <span class="built_in">shift</span></span><br><span class="line"> ;;</span><br><span class="line"></span><br><span class="line"> --noscripts)</span><br><span class="line"> noscripts=1</span><br><span class="line"> <span class="built_in">shift</span></span><br><span class="line"> ;;</span><br><span class="line"></span><br><span class="line"> --version)</span><br><span class="line"> <span class="built_in">printf</span> <span class="string">"<span class="variable">$version</span>"</span></span><br><span class="line"> <span class="built_in">exit</span></span><br><span class="line"> ;;</span><br><span class="line"></span><br><span class="line"> update)</span><br><span class="line"> <span class="built_in">command</span>=<span class="variable">$1</span></span><br><span class="line"> <span class="built_in">shift</span></span><br><span class="line"> ;;</span><br><span class="line"></span><br><span class="line"> list | cache | remove | depends | listall | download | listfiles |\</span><br><span class="line"> show | mirror | search | install | category | rdepends | searchall )</span><br><span class="line"> <span class="keyword">if</span> [[ <span class="variable">$command</span> ]]</span><br><span class="line"> <span class="keyword">then</span></span><br><span class="line"> pks+=(<span class="string">"<span class="variable">$1</span>"</span>)</span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> <span class="built_in">command</span>=<span class="variable">$1</span></span><br><span class="line"> <span class="keyword">fi</span></span><br><span class="line"> <span class="built_in">shift</span></span><br><span class="line"> ;;</span><br><span class="line"></span><br><span class="line"> *)</span><br><span class="line"> pks+=(<span class="string">"<span class="variable">$1</span>"</span>)</span><br><span class="line"> <span class="built_in">shift</span></span><br><span class="line"> ;;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">esac</span></span><br><span class="line"><span class="keyword">done</span></span><br><span class="line"></span><br><span class="line"><span class="built_in">set</span> -a</span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> <span class="built_in">type</span> -t apt-<span class="variable">$command</span> | grep -q <span class="keyword">function</span></span><br><span class="line"><span class="keyword">then</span></span><br><span class="line"> <span class="built_in">readonly</span> <span class="built_in">arch</span>=<span class="variable">${HOSTTYPE/i6/x}</span></span><br><span class="line"> apt-<span class="variable">$command</span></span><br><span class="line"><span class="keyword">else</span></span><br><span class="line"> <span class="built_in">printf</span> <span class="string">"<span class="variable">$usage</span>"</span></span><br><span class="line"><span class="keyword">fi</span></span><br></pre></td></tr></table></figure><h1 id="需要添加的环境变量"><a href="#需要添加的环境变量" class="headerlink" title="需要添加的环境变量"></a>需要添加的环境变量</h1><pre><code>Cygwin\binCygwin\sbinCygwin\usr\sbin</code></pre><p><a href="https://blog.csdn.net/hu_yinghui/article/details/125263154">参考链接1</a><br><a href="https://blog.csdn.net/nianjiuhuiyi/article/details/121989680">参考链接2</a></p>]]></content>
<tags>
<tag> Cygwin </tag>
</tags>
</entry>
<entry>
<title>搭建hexo</title>
<link href="/2023/02/16/hexo/%E6%90%AD%E5%BB%BAhexo/"/>
<url>/2023/02/16/hexo/%E6%90%AD%E5%BB%BAhexo/</url>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><p><a href="/images/%E6%90%AD%E5%BB%BAhexo.pdf">点击访问 搭建hexo.pdf</a></p><iframe src="//player.bilibili.com/player.html?aid=817033871&bvid=BV1tG4y1h7UE&cid=875426844&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe><h1 id="hexo博客搭建教程"><a href="#hexo博客搭建教程" class="headerlink" title="hexo博客搭建教程"></a>hexo博客搭建教程</h1><h2 id="准备工作"><a href="#准备工作" class="headerlink" title="准备工作"></a>准备工作</h2><pre><code>需要安装:nodejs、git-bash因官网下载太慢,这里使用nodejs的国内网站和git-bash的镜像网站进行下载nodejs链接:http://nodejs.cn/download/ nodejs下载地址:https://cdn.npmmirror.com/binaries/node/v16.17.0/node-v16.17.0-x64.msigit-bash链接:https://registry.npmmirror.com/binary.html?path=git-for-windows/ git-bash下载地址:https://cdn.npmmirror.com/binaries/git-for-windows/v2.38.0.windows.1/Git-2.38.0-64-bit.exe接下来安装nodejs和git-bash</code></pre><h3 id="nodejs安装教程:"><a href="#nodejs安装教程:" class="headerlink" title="nodejs安装教程:"></a>nodejs安装教程:</h3><p><img src="/images/nodejs/%E6%8D%95%E8%8E%B71.PNG"><br><img src="/images/nodejs/%E6%8D%95%E8%8E%B72.PNG"><br><img src="/images/nodejs/%E6%8D%95%E8%8E%B73.PNG"><br><img src="/images/nodejs/%E6%8D%95%E8%8E%B74.PNG"><br><img src="/images/nodejs/%E6%8D%95%E8%8E%B75.PNG"><br><img src="/images/nodejs/%E6%8D%95%E8%8E%B76.PNG"><br><img src="/images/nodejs/%E6%8D%95%E8%8E%B77.PNG"><br><img src="/images/nodejs/%E6%8D%95%E8%8E%B78.PNG"></p><h3 id="git-bash安装教程:"><a href="#git-bash安装教程:" class="headerlink" title="git-bash安装教程:"></a>git-bash安装教程:</h3><p><img src="/images/git-bash/%E6%8D%95%E8%8E%B71.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B72.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B73.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B74.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B75.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B76.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B77.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B78.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B79.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B710.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B711.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B712.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B713.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B714.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B715.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B716.PNG"><br><img src="/images/git-bash/%E6%8D%95%E8%8E%B717.PNG"></p><h2 id="开始搭建"><a href="#开始搭建" class="headerlink" title="开始搭建"></a>开始搭建</h2><pre><code>接下来开始搭建hexo: 在git-bash中执行命令 npm install hexo-cli -g#安装博客框架 执行 hexo init#生成博客的站点目录 执行命令 hexo s 可以启动本地博客,博客显示的内容 在站点目录的 source/_posts/ 路径下 修改配置文件 准备一个qq邮箱之外的邮箱,邮箱的实用性越高越好,因此我建议的邮箱是微软的Outlook邮箱,官网是 outlook.live.com 可以在注册一个Outlook邮箱,注册完Outlook邮箱之后就可以到 github.com官网 注册了,搭建hexo的前提是在github.com官网 注册并搭建一个用于部署hexo的仓库。 在github注册并新建一个仓库,仓库格式为 仓库名.github.io,然后将该仓库生成的ssh链接复制下来,打开刚刚创建的站点目录下的 _config.yml vim _config.yml 在该文件的最下面,有一段代码: # Deployment ## Docs: https://hexo.io/docs/one-command-deployment deploy: type: ' ' 将代码更改为: # Deployment ## Docs: https://hexo.io/docs/one-command-deployment deploy: type: 'git'#部署博客类型 repo: [email protected]:zzfxdyn/zzfxdyn.github.io.git#仓库生成的链接 branch: main#仓库默认分支 同时将该文件中url:http://example.com改为 https://仓库名 npm install hexo-deployer-git --save#安装博客部署插件 生成ssh密钥 ssh-keygen -t rsa -C "注册github时的邮箱" 连续多次回车,生成ssh密钥在,按照提示的路径进入该路径下复制 id_rsa.pub 的内容 默认路径为 ~/.ssh,在git-bash中通过命令 cd ~/.ssh 进入该路径 cat id_rsa.pub#显示id_rsa.pub的内容,然后鼠标选中复制 复制的内容为生成的密钥的公钥,回到浏览器,打开github的设置,点击SSH and GPG Keys, 添加新的密钥,自定义一个名字,粘贴密钥并确定 回到git-bash,配置好站点目录文件后执行命令 git config --global user.email "[email protected]" git config --global user.name "Your Name" 执行 hexo clean && hexo g && hexo d 测试博客部署插件是否安装成功</code></pre><h2 id="vim编辑器的使用方法"><a href="#vim编辑器的使用方法" class="headerlink" title="vim编辑器的使用方法"></a>vim编辑器的使用方法</h2><pre><code>vim之所以被称之为强大的编辑器是因为本身支持很多的模式命令模式 命令行模式(底行模式) 编辑模式(插入模式) 可视 可视块 可视行注意 : 不要使用vim打开目录文件注意 : 用vim编写完成的文件内容要用正常的保存退出方式,不要直接关闭终端 否则会生成交换文件(交换文件是隐藏文件) vim hello.c |按iIoOaAV按:编辑模式<----------命令模式---------->命令行模式 ---------><--------- 按esc按esc或者删掉:命令行模式的操作 :w保存 :q退出 :wq保存并且退出</code></pre><h2 id="如何修改hosts文件"><a href="#如何修改hosts文件" class="headerlink" title="如何修改hosts文件"></a>如何修改hosts文件</h2><h3 id="第一种方法"><a href="#第一种方法" class="headerlink" title="第一种方法"></a>第一种方法</h3><pre><code>也是网上推荐较多的,比较常用的方法</code></pre><p><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B71.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B72.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B73.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B74.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B75.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B76.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B77.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B78.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B79.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B710.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B711.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B712.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B713.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B714.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B715.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B716.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B717.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B718.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B719.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B720.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B721.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B722.PNG"></p><h3 id="第二种方法"><a href="#第二种方法" class="headerlink" title="第二种方法"></a>第二种方法</h3><pre><code>通过网站获得github网站的ip,我用的是 ipaddress.com 这个网站,点击进入网站后会显示一个403页面,再点击 Go to Homepage 即可真正进入网站。</code></pre><p><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B71.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B72.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B73.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B74.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B75.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B76.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B77.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B78.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B79.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B710.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B711.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B712.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B713.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B714.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B715.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B716.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B717.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B718.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B719.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B720.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B721.PNG"><br><img src="/images/%E4%BF%AE%E6%94%B9hosts%E6%96%87%E4%BB%B6%E7%9A%84%E6%95%99%E7%A8%8B/%E7%AC%AC%E4%BA%8C%E7%A7%8D%E6%96%B9%E6%B3%95/%E6%8D%95%E8%8E%B722.PNG"></p>]]></content>
<tags>
<tag> hexo </tag>
</tags>
</entry>
<entry>
<title>1DM+使用教程</title>
<link href="/2023/02/16/1DM+/"/>
<url>/2023/02/16/1DM+/</url>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><h1 id="1DM-官方介绍"><a href="#1DM-官方介绍" class="headerlink" title="1DM+官方介绍"></a>1DM+官方介绍</h1><p>1DM+「原:IDM+」 号称是目前 Android 平台最快、最先进的下载管理器应用「支持通过Torrent下载」。官方号称其下载速度是正常下载速度的 500%。实际下载速度也是很可观的,可以和ADM比肩。</p><p>安装方式<br>从酷安官网的网页上直接搜索下载 <a href="https://www.coolapk.com/apk/idm.internet.download.manager.plus">1DM+</a><br>链接:<a href="https://www.coolapk.com/apk/idm.internet.download.manager.plus">https://www.coolapk.com/apk/idm.internet.download.manager.plus</a></p><h1 id="下载并配置1DM"><a href="#下载并配置1DM" class="headerlink" title="下载并配置1DM+"></a>下载并配置1DM+</h1><p>下载1DM+</p><p><img src="/images/1DM+/%E6%8D%95%E8%8E%B71.PNG"></p><p>安装并打开,选择中文简体</p><p><img src="/images/1DM+/%E6%8D%95%E8%8E%B72.PNG"></p><p>授权 允许访问设备文件</p><p><img src="/images/1DM+/%E6%8D%95%E8%8E%B73.PNG"></p><p>设置文件保存路径,根据自己的喜好自行设置</p><p><img src="/images/1DM+/%E6%8D%95%E8%8E%B74.PNG"></p><p>配置完成</p><p><img src="/images/1DM+/%E6%8D%95%E8%8E%B75.PNG"></p><h1 id="使用教程"><a href="#使用教程" class="headerlink" title="使用教程"></a>使用教程</h1><p>复制要下载的文件的链接 <code>https://f-droid.org/F-Droid.apk</code></p><p><img src="/images/1DM+/%E6%8D%95%E8%8E%B76.PNG"></p><p>回到 1DM+ ,点击 <code>+</code> 号</p><p><img src="/images/1DM+/%E6%8D%95%E8%8E%B77.PNG"></p><p>点击 添加链接</p><p><img src="/images/1DM+/%E6%8D%95%E8%8E%B78.PNG"></p><p>将链接粘入 下载链接 位置,点击 连接 ,等待加载,点击 开始 进行下载</p><p><img src="/images/1DM+/%E6%8D%95%E8%8E%B79.PNG"></p><p><img src="/images/1DM+/%E6%8D%95%E8%8E%B710.PNG"></p><p>效果</p><p><img src="/images/1DM+/%E6%8D%95%E8%8E%B711.PNG"></p>]]></content>
<tags>
<tag> 1DM+ </tag>
</tags>
</entry>
</search>