-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.html
198 lines (188 loc) · 16.3 KB
/
README.html
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2023-09-05 Tue 02:10 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>‎</title>
<meta name="author" content="Jeet Ray" />
<meta name="generator" content="Org Mode" />
<link rel="stylesheet" type="text/css" href="https://combinatronics.io/sylvorg/bundle/main/src/styles/primary/syvl.css" />
<link rel="icon" href="https://combinatronics.io/sylvorg/bundle/main/src/icons/favicons/shiny-zigzagoon-galar.ico" sizes="any" />
<link rel="icon" href="https://combinatronics.io/sylvorg/bundle/main/src/icons/favicons/shiny-zigzagoon-galar.svg" />
<link rel="manifest" href="https://combinatronics.io/sylvorg/bundle/main/manifest.json" />
<link rel="stylesheet" type="text/css" href="https://combinatronics.io/sylvorg/bundle/main/src/styles/highlight/paraiso-dark.min.css" />
<script src="https://combinatronics.io/sylvorg/bundle/main/src/scripts/highlight/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<div class="header">
<h1>We Are Syvlorg.</h1>
<a href="">About Me</a>
<a href="">About This Website</a>
<a href="">About Syvlorg</a>
<a href="https://resume.syvl.org">Résumé</a>
<a href="https://index.syvl.org">Index</a>
</div>
</head>
<body>
<div id="content" class="content">
<div id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#orgc390538">index.html</a>
<ul>
<li><a href="#cca54aae-22bc-4c33-899f-67fa8ec2eb8e">index.sh</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-orgc390538" class="outline-2">
<h2 id="orgc390538">index.html</h2>
<div class="outline-text-2" id="text-orgc390538">
<div class="org-src-container">
<pre><code class="language-lisp match-braces rainbow-braces" id="org6731dc9">(<span style="font-weight: bold;">if</span> (file-exists-p <span style="font-style: italic;">"./README.html"</span>) (<span style="font-weight: bold;">with-temp-buffer</span> (insert-file-contents <span style="font-style: italic;">"./README.html"</span>) (buffer-string)) <span style="font-style: italic;">""</span>)
</code></pre>
</div>
<p>
This was adapted from <a href="https://ellipsis.sh/">ellipsis.sh</a>, raw file <a href="https://raw.githubusercontent.com/ellipsis/ellipsis/gh-pages/index.html">here</a>:
</p>
<div class="org-src-container">
<pre><code class="language-sh match-braces rainbow-braces"><<\EOF <span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">This is also a bootstrapping script! Check out <a href="https://bootstrap.syvl.org">the <code>bootstrap</code> program</a> and <a href="https://index.syvl.org">the shell script</a> for more information.</span>
</code></pre>
</div>
<div class="org-src-container">
<pre><code class="language-html match-braces rainbow-braces">nil<span style="font-weight: bold; font-style: italic;"><!-- </span><span style="font-weight: bold; font-style: italic;">This is where the site html goes.</span>
</code></pre>
</div>
<div class="org-src-container">
<pre><code class="language-sh match-braces rainbow-braces">EOF
<span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">This is where the site html ends.</span>
</code></pre>
</div>
</div>
<div id="outline-container-cca54aae-22bc-4c33-899f-67fa8ec2eb8e" class="outline-3">
<h3 id="cca54aae-22bc-4c33-899f-67fa8ec2eb8e">index.sh</h3>
<div class="outline-text-3" id="text-cca54aae-22bc-4c33-899f-67fa8ec2eb8e">
<p>
For information on how to prompt when piping to <code>sh</code>, see <a href="https://unix.stackexchange.com/users/48083/graeme">Graeme's</a> answer <a href="https://unix.stackexchange.com/a/121255/270053">here</a>,
and <a href="https://stackoverflow.com/users/2092245/ferhtgoldaraz">ferhtgoldaraz's</a> answer <a href="https://stackoverflow.com/a/15696250/10827766">here</a>.
</p>
<div class="org-src-container">
<pre><code class="language-sh match-braces rainbow-braces"><span style="font-weight: bold;">set</span> -eo pipefail
mkdir -p <span style="font-style: italic;">"$HOME/.local/share/syvl"</span>
<span style="font-weight: bold; font-style: italic;">bootstrap</span>=<span style="font-style: italic;">"$HOME/.local/share/syvl/bootstrap"</span>
<span style="font-weight: bold; font-style: italic;">flake</span>=<span style="font-style: italic;">"$HOME/.local/share/syvl/flake.nix"</span>
<span style="font-weight: bold; font-style: italic;">default</span>=<span style="font-style: italic;">"$HOME/.local/share/syvl/default.nix"</span>
<span style="font-weight: bold; font-style: italic;">lockfile</span>=<span style="font-style: italic;">"$HOME/.local/share/syvl/flake.lock"</span>
</code></pre>
</div>
<p>
Adapted from <a href="https://unix.stackexchange.com/users/48083/graeme">Graeme's</a> answer <a href="https://unix.stackexchange.com/a/121255/270053">here</a>,
and <a href="https://stackoverflow.com/users/2092245/ferhtgoldaraz">ferhtgoldaraz's</a> answer <a href="https://stackoverflow.com/a/15696250/10827766">here</a>:
</p>
<div class="org-src-container">
<pre><code class="language-sh match-braces rainbow-braces"><span style="font-weight: bold;">if</span> [ -f <span style="font-style: italic;">"$bootstrap"</span> ]; <span style="font-weight: bold;">then</span>
<span style="font-weight: bold;">read</span> -p $<span style="font-style: italic;">'Curl hylang bootstrap script: '</span> curlIndexScript < /dev/tty
<span style="font-weight: bold;">else</span>
<span style="font-weight: bold; font-style: italic;">curlIndexScript</span>=<span style="font-style: italic;">"yes"</span>
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">if</span> [ <span style="font-style: italic;">"$curlIndexScript"</span> == <span style="font-style: italic;">"y"</span> ] || [ <span style="font-style: italic;">"$curlIndexScript"</span> == <span style="font-style: italic;">"yes"</span> ]; <span style="font-weight: bold;">then</span>
curl -fsSLo $<span style="font-weight: bold; font-style: italic;">bootstrap</span> https://raw.githubusercontent.com/sylvorg/sylvorg.github.io/main/index.hy
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">if</span> [ -f <span style="font-style: italic;">"$flake"</span> ]; <span style="font-weight: bold;">then</span>
<span style="font-weight: bold;">read</span> -p $<span style="font-style: italic;">'Curl nix flake: '</span> curlNixFlake < /dev/tty
<span style="font-weight: bold;">else</span>
<span style="font-weight: bold; font-style: italic;">curlNixFlake</span>=<span style="font-style: italic;">"yes"</span>
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">if</span> [ <span style="font-style: italic;">"$curlNixFlake"</span> == <span style="font-style: italic;">"y"</span> ] || [ <span style="font-style: italic;">"$curlNixFlake"</span> == <span style="font-style: italic;">"yes"</span> ]; <span style="font-weight: bold;">then</span>
curl -fsSLo $<span style="font-weight: bold; font-style: italic;">flake</span> https://raw.githubusercontent.com/sylvorg/sylvorg.github.io/main/flake.nix
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">if</span> [ -f <span style="font-style: italic;">"$lockfile"</span> ]; <span style="font-weight: bold;">then</span>
<span style="font-weight: bold;">read</span> -p $<span style="font-style: italic;">'Curl nix flake lockfile: '</span> curlNixLockfile < /dev/tty
<span style="font-weight: bold;">else</span>
<span style="font-weight: bold; font-style: italic;">curlNixLockfile</span>=<span style="font-style: italic;">"yes"</span>
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">if</span> [ <span style="font-style: italic;">"$curlNixLockfile"</span> == <span style="font-style: italic;">"y"</span> ] || [ <span style="font-style: italic;">"$curlNixLockfile"</span> == <span style="font-style: italic;">"yes"</span> ]; <span style="font-weight: bold;">then</span>
curl -fsSLo $<span style="font-weight: bold; font-style: italic;">lockfile</span> https://raw.githubusercontent.com/sylvorg/sylvorg.github.io/main/flake.lock
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">if</span> [ -f <span style="font-style: italic;">"$default"</span> ]; <span style="font-weight: bold;">then</span>
<span style="font-weight: bold;">read</span> -p $<span style="font-style: italic;">'Curl flake-compat default.nix: '</span> curlNixDefault < /dev/tty
<span style="font-weight: bold;">else</span>
<span style="font-weight: bold; font-style: italic;">curlNixDefault</span>=<span style="font-style: italic;">"yes"</span>
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">if</span> [ <span style="font-style: italic;">"$curlNixDefault"</span> == <span style="font-style: italic;">"y"</span> ] || [ <span style="font-style: italic;">"$curlNixDefault"</span> == <span style="font-style: italic;">"yes"</span> ]; <span style="font-weight: bold;">then</span>
curl -fsSLo $<span style="font-weight: bold; font-style: italic;">default</span> https://raw.githubusercontent.com/sylvorg/sylvorg.github.io/main/default.nix
<span style="font-weight: bold;">fi</span>
</code></pre>
</div>
<div class="org-src-container">
<pre><code class="language-sh match-braces rainbow-braces">chmod +x $<span style="font-weight: bold; font-style: italic;">bootstrap</span>
<span style="font-weight: bold;">if </span><span style="font-weight: bold;">hash</span> nix 2> /dev/null; <span style="font-weight: bold;">then</span>
$<span style="font-weight: bold; font-style: italic;">bootstrap</span> $<span style="font-weight: bold; font-style: italic;">@</span>
<span style="font-weight: bold;">else</span>
<span style="font-weight: bold;">read</span> -p $<span style="font-style: italic;">'Install nix: '</span> installNix < /dev/tty
<span style="font-weight: bold;">if</span> [ <span style="font-style: italic;">"$installNix"</span> == <span style="font-style: italic;">"y"</span> ] || [ <span style="font-style: italic;">"$installNix"</span> == <span style="font-style: italic;">"yes"</span> ]; <span style="font-weight: bold;">then</span>
<span style="font-weight: bold;">read</span> -p $<span style="font-style: italic;">'Install nix as multi-user: '</span> installMulti < /dev/tty
<span style="font-weight: bold;">if</span> [ <span style="font-style: italic;">"$installMulti"</span> == <span style="font-style: italic;">"y"</span> ] || [ <span style="font-style: italic;">"$installMulti"</span> == <span style="font-style: italic;">"yes"</span> ]; <span style="font-weight: bold;">then</span>
sh <(curl -fsSL https://nixos.org/nix/install) --daemon
<span style="font-weight: bold;">else</span>
sh <(curl -fsSL https://nixos.org/nix/install) --no-daemon
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">set</span> +eo pipefail
<span style="font-weight: bold;">if</span> ! $<span style="font-weight: bold; font-style: italic;">bootstrap</span> $<span style="font-weight: bold; font-style: italic;">@</span>; <span style="font-weight: bold;">then</span>
<span style="font-weight: bold;">set</span> -eo pipefail
<span style="font-weight: bold;">if</span> [ <span style="font-style: italic;">"$(uname -o)"</span> == <span style="font-style: italic;">"Android"</span> ]; <span style="font-weight: bold;">then</span>
termux-setup-storage
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">read</span> -p $<span style="font-style: italic;">'Nix-shell bootstrap failed; try again after installing dependencies: '</span> installDeps < /dev/tty
<span style="font-weight: bold;">if</span> [ <span style="font-style: italic;">"$installDeps"</span> == <span style="font-style: italic;">"y"</span> ] || [ <span style="font-style: italic;">"$installDeps"</span> == <span style="font-style: italic;">"yes"</span> ]; <span style="font-weight: bold;">then</span>
<span style="font-weight: bold; font-style: italic;">pacapt</span>=<span style="font-style: italic;">"$HOME/.local/share/syvl/pacapt"</span>
<span style="font-weight: bold;">if</span> [ -f <span style="font-style: italic;">"$pacapt"</span> ]; <span style="font-weight: bold;">then</span>
<span style="font-weight: bold;">read</span> -p $<span style="font-style: italic;">'Curl pacapt: '</span> curlPacapt < /dev/tty
<span style="font-weight: bold;">else</span>
<span style="font-weight: bold; font-style: italic;">curlPacapt</span>=<span style="font-style: italic;">"yes"</span>
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">if</span> [ <span style="font-style: italic;">"$curlPacapt"</span> == <span style="font-style: italic;">"y"</span> ] || [ <span style="font-style: italic;">"$curlPacapt"</span> == <span style="font-style: italic;">"yes"</span> ]; <span style="font-weight: bold;">then</span>
<span style="font-weight: bold;">if</span> [ <span style="font-style: italic;">"$(uname -o)"</span> == <span style="font-style: italic;">"Android"</span> ]; <span style="font-weight: bold;">then</span>
pkg install curl
ln -s /data/data/com.termux/files/usr/lib/libssl.so /data/data/com.termux/files/usr/lib/libssl.so.1.1 || :
ln -s /data/data/com.termux/files/usr/lib/libcrypto.so /data/data/com.termux/files/usr/lib/libcrypto.so.1.1 || :
apt update
apt upgrade
<span style="font-weight: bold;">fi</span>
curl -fsSLo $<span style="font-weight: bold; font-style: italic;">pacapt</span> https://raw.githubusercontent.com/icy/pacapt/ng/pacapt
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">read</span> -p $<span style="font-style: italic;">'Install dependencies: '</span> setupDependencies < /dev/tty
<span style="font-weight: bold;">if</span> [ <span style="font-style: italic;">"$setupDependencies"</span> == <span style="font-style: italic;">"y"</span> ] || [ <span style="font-style: italic;">"$setupDependencies"</span> == <span style="font-style: italic;">"yes"</span> ]; <span style="font-weight: bold;">then</span>
chmod +x $<span style="font-weight: bold; font-style: italic;">pacapt</span>
$<span style="font-weight: bold; font-style: italic;">pacapt</span> -Syyu yadm git fd emacs gnupg git-crypt pass python assh
pip install --force-reinstall --upgrade https://github.com/syvlorg/bakery/archive/main.tar.gz <span style="font-style: italic;">\</span>
https://github.com/syvlorg/tailapi/archive/main.tar.gz <span style="font-style: italic;">\</span>
requests
<span style="font-weight: bold;">if</span> [ <span style="font-style: italic;">"$(uname -o)"</span> == <span style="font-style: italic;">"Android"</span> ]; <span style="font-weight: bold;">then</span>
ln -sf $(<span style="font-weight: bold;">which</span> sh) $(dirname $(<span style="font-weight: bold;">which</span> sh))/nix-shell
<span style="font-weight: bold;">else</span>
$<span style="font-weight: bold; font-style: italic;">pacapt</span> -Syyu tailscale
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">fi</span>
hy $<span style="font-weight: bold; font-style: italic;">bootstrap</span> $<span style="font-weight: bold; font-style: italic;">@</span>
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">fi</span>
<span style="font-weight: bold;">fi</span>
</code></pre>
</div>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Jeet Ray</p>
<p class="date">Created: 2023-09-05 Tue 02:10</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
</html>