sskras / .files

Personal attempt at automating setup of a new home dir / managing dot-files in a cross-platform way.
Other
1 stars 0 forks source link

Improve download tooling (`curl` might be missing) #8

Open sskras opened 3 days ago

sskras commented 3 days ago

Well, initially user might switch to wget -O- ... instead:

root@u2004:~# wget -O- inx.lv/mi3u | sh
--2024-11-27 19:51:21--  http://inx.lv/mi3u
Resolving inx.lv (inx.lv)... 194.152.32.40
Connecting to inx.lv (inx.lv)|194.152.32.40|:80... connected.
HTTP request sent, awaiting response... 302 Found
Cookie coming from inx.lv attempted to set domain to inbox.lv
Location: https://raw.githubusercontent.com/sskras/.files/main/.local/bin/boot-home [following]
--2024-11-27 19:51:21--  https://raw.githubusercontent.com/sskras/.files/main/.local/bin/boot-home
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1777 (1.7K) [text/plain]
Saving to: 'STDOUT'

-                                                    100%[====================================================================================================================>]   1.74K  --.-KB/s    in 0s

2024-11-27 19:51:22 (58.9 MB/s) - written to stdout [1777/1777]

sh: 28: curl: not found
make: *** No rule to make target 'install'.  Stop.

... but later this error pops up:

curl: not found

So the bootstrap either needs to ask for one more dependency to be present, or to aggregate popular/possible downloading tools into a shell fn.

sskras commented 2 days ago

More or less fixed via two patches: https://github.com/sskras/.files/compare/ddcb402%5E...fef86b5.

It also would be nice to convert this static line into conditional content: https://github.com/sskras/.files/blob/fef86b57b86c9d066b12e0f88c81c6ec56204df7/.local/bin/boot-home#L54-L56

So not closing yet.