Leah Rowe
9f58d4e481
build/cbutils: 79 chars or less per line
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-20 16:13:02 +01:00
Leah Rowe
691f266441
build/cbutils: use tabs for indendation
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-20 16:12:25 +01:00
Leah Rowe
3cbcfce9d1
gitclone: add my copyright for recent changes
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 13:19:38 +01:00
Leah Rowe
01a2ab3756
use env in shell scripts
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 13:17:28 +01:00
Leah Rowe
1e8f2cc170
gitclone: only rm the old directory at the end
...
this way, it will only be deleted after the
new git clone and patching worked successfully
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 13:03:28 +01:00
Leah Rowe
3da8d20cd6
gitclone: stricter error handling
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 13:01:12 +01:00
Leah Rowe
e804849486
gitclone: minor cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 12:56:42 +01:00
Leah Rowe
fd2ca12e9e
gitclone: split logic out of main()
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 12:55:34 +01:00
Leah Rowe
08ad9eb15f
download/coreboot: minor cleanup
2023-05-18 12:37:55 +01:00
Leah Rowe
8d9570b6f7
gitclone: cleaner coding style
...
main() on top
top-down logic
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 12:34:47 +01:00
Leah Rowe
4ac0bc8d3e
blobutil/download: minor code cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 11:41:56 +01:00
Leah Rowe
9fb489ac3e
modify: clean up duplicated code
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 11:24:08 +01:00
Leah Rowe
f7f3aef17e
modify: cleaner coding style
...
main() on top
top-down logic
reduced indentation
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 11:14:49 +01:00
Leah Rowe
34df727c98
build: cleaner coding style
...
main() on top
top-down logic
reduced indentation
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 10:49:47 +01:00
Leah Rowe
1a062bb628
build: reduce code to less than 80 chars per line
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 10:21:54 +01:00
Leah Rowe
a212a5bec8
blobutil: exit 1 if a called script fails
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 10:11:32 +01:00
Leah Rowe
e62215718c
blobutil: cleaner coding style
...
reduced indentation
main() on top
top-down logic
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 10:09:57 +01:00
Leah Rowe
c08e3258cb
.gitcheck: exit 1 if unsupported argument given
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:55:40 +01:00
Leah Rowe
c51225577b
.gitcheck: use subshells where appropriate
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:49:26 +01:00
Leah Rowe
dd8fb524df
.gitcheck: re-add redirection to /dev/null
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:47:44 +01:00
Leah Rowe
82c4d7b280
.gitcheck clean: clean coreboot directories too
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:44:11 +01:00
Leah Rowe
0f3c3ca600
.gitcheck: reduce indentation level for loop
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:42:06 +01:00
Leah Rowe
ecd7f1d11e
.gitcheck: move logic out of main()
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:41:00 +01:00
Leah Rowe
829bc02bf2
.gitcheck: *actually* check coreboot directories
2023-05-18 09:38:20 +01:00
Leah Rowe
52bc07bc84
.gitcheck: improved coding style
...
main() on top
top-down order of logic
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:35:26 +01:00
Leah Rowe
83235fb96b
.gitcheck: check argv when running gitcheck-clean
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:25:25 +01:00
Leah Rowe
6ce77652c6
.gitcheck: actually *run* gitcheck-clean
...
Run() is called, but without argument.
This patch fixes that.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:23:23 +01:00
Leah Rowe
8782bff8ef
download: code cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:18:42 +01:00
Leah Rowe
a232f9c575
download: check for non-existent script in loop
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:16:50 +01:00
Leah Rowe
b4f1804e48
download script: bugfix: gitcheck clean didn't run
...
the "placeholder" git credentials were not being
wiped, which sometimes overwrites the user's git
credentials permanently, when working on lbmk
(permanently, until manually reset by the user)
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:12:27 +01:00
Leah Rowe
62c88dfb6e
download script: improved coding style
...
introduce main()
cleaned up the if/else block
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18 09:11:59 +01:00
Leah Rowe
5b59490928
util/spkmodem_recv: Use pledge but only on OpenBSD
...
It will only be used on OpenBSD. Other operating
systems will behave in the same way.
Pledge is feature specific to OpenBSD that
restricts system operations, for security:
https://man.openbsd.org/pledge.2
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
25241ae222
util/spkmodem_recv: Add -u flag (no line buffer)
...
printf outputs to stdout, which is line buffered
by default.
Adding a -u option to disable buffering.
Exit when a non-support flag is given, but adhere
to current behaviour when no flag is given.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
01fdfa3ab6
util/spkmodem_recv: Tidy up global variables
...
They do not need to be initialised zero, because
global variables are always zero by default,
unless set differently by the programmer.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
50b35939de
util/spkmodem_recv: Make pulse variable global
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
14190de9e8
util/spkmodem_recv: Use parentheses on comparisons
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
c0f2bf3077
util/spkmodem_recv: Move global variable: pulse
...
It is only used by a single function.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
5d03598b99
util/spkmodem_recv: Purge unused global: amplitude
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
63e43819b3
util/spkmodem_recv: Remove unused variable: pos
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
a0abcb9f53
util/spkmodem_recv: Re-order functions for clarity
...
print_char() is referenced last, so declare it last.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
93cc664254
util/spkmodem_recv: Handle output in new function
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
27866e65fb
util/spkmodem_recv: Re-order prototypes
...
Put them in the same order as declared.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
8b851258e2
util/spkmodem_recv: Rename functions for clarity
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
6c1bf756d3
util/spkmodem_recv: Return errno in main
...
This is a good general practise, to catch errors.
Any errors found can then be handled in code.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
c23806e1f6
util/spkmodem_recv: Use correct printf specifier
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
0cc23b2363
util/spkmodem_recv: Add error handling
...
There was literally no error handling before.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
179323819b
util/spkmodem_recv: Move logic out of main
...
Main should only be a skeletal structure.
Actual logic should always be handled externally.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
3d55429443
util/spkmodem_recv: Rename variable for clarity
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
697ae5e2ca
util/spkmodem_recv: Remove use of static keyword
...
It is entirely superfluous in this program.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00
Leah Rowe
2c12e70cfe
util/spkmodem_recv: Rename variable for clarity
...
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-16 23:11:35 +01:00