-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·294 lines (284 loc) · 20.5 KB
/
index.html
File metadata and controls
executable file
·294 lines (284 loc) · 20.5 KB
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<<\EOF # 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.
<?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>
<!-- This is where the site html goes.
EOF
# This is where the site html ends.
set -eo pipefail
mkdir -p "$HOME/.local/share/syvl"
bootstrap="$HOME/.local/share/syvl/bootstrap"
flake="$HOME/.local/share/syvl/flake.nix"
default="$HOME/.local/share/syvl/default.nix"
lockfile="$HOME/.local/share/syvl/flake.lock"
if [ -f "$bootstrap" ]; then
read -p $'Curl hylang bootstrap script: ' curlIndexScript < /dev/tty
else
curlIndexScript="yes"
fi
if [ "$curlIndexScript" == "y" ] || [ "$curlIndexScript" == "yes" ]; then
curl -fsSLo $bootstrap https://raw.githubusercontent.com/sylvorg/sylvorg.github.io/main/index.hy
fi
if [ -f "$flake" ]; then
read -p $'Curl nix flake: ' curlNixFlake < /dev/tty
else
curlNixFlake="yes"
fi
if [ "$curlNixFlake" == "y" ] || [ "$curlNixFlake" == "yes" ]; then
curl -fsSLo $flake https://raw.githubusercontent.com/sylvorg/sylvorg.github.io/main/flake.nix
fi
if [ -f "$lockfile" ]; then
read -p $'Curl nix flake lockfile: ' curlNixLockfile < /dev/tty
else
curlNixLockfile="yes"
fi
if [ "$curlNixLockfile" == "y" ] || [ "$curlNixLockfile" == "yes" ]; then
curl -fsSLo $lockfile https://raw.githubusercontent.com/sylvorg/sylvorg.github.io/main/flake.lock
fi
if [ -f "$default" ]; then
read -p $'Curl flake-compat default.nix: ' curlNixDefault < /dev/tty
else
curlNixDefault="yes"
fi
if [ "$curlNixDefault" == "y" ] || [ "$curlNixDefault" == "yes" ]; then
curl -fsSLo $default https://raw.githubusercontent.com/sylvorg/sylvorg.github.io/main/default.nix
fi
chmod +x $bootstrap
if hash nix 2> /dev/null; then
$bootstrap $@
else
read -p $'Install nix: ' installNix < /dev/tty
if [ "$installNix" == "y" ] || [ "$installNix" == "yes" ]; then
read -p $'Install nix as multi-user: ' installMulti < /dev/tty
if [ "$installMulti" == "y" ] || [ "$installMulti" == "yes" ]; then
sh <(curl -fsSL https://nixos.org/nix/install) --daemon
else
sh <(curl -fsSL https://nixos.org/nix/install) --no-daemon
fi
fi
set +eo pipefail
if ! $bootstrap $@; then
set -eo pipefail
if [ "$(uname -o)" == "Android" ]; then
termux-setup-storage
fi
read -p $'Nix-shell bootstrap failed; try again after installing dependencies: ' installDeps < /dev/tty
if [ "$installDeps" == "y" ] || [ "$installDeps" == "yes" ]; then
pacapt="$HOME/.local/share/syvl/pacapt"
if [ -f "$pacapt" ]; then
read -p $'Curl pacapt: ' curlPacapt < /dev/tty
else
curlPacapt="yes"
fi
if [ "$curlPacapt" == "y" ] || [ "$curlPacapt" == "yes" ]; then
if [ "$(uname -o)" == "Android" ]; then
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
fi
curl -fsSLo $pacapt https://raw.githubusercontent.com/icy/pacapt/ng/pacapt
fi
read -p $'Install dependencies: ' setupDependencies < /dev/tty
if [ "$setupDependencies" == "y" ] || [ "$setupDependencies" == "yes" ]; then
chmod +x $pacapt
$pacapt -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 \
https://github.com/syvlorg/tailapi/archive/main.tar.gz \
requests
if [ "$(uname -o)" == "Android" ]; then
ln -sf $(which sh) $(dirname $(which sh))/nix-shell
else
$pacapt -Syyu tailscale
fi
fi
hy $bootstrap $@
fi
fi
fi