Commit Graph

14 Commits

Author SHA1 Message Date
d60a8e4c8e scripts: Remove explicit rustup self update
Commit 17f8e37ed5 ("Convert toolchain file to TOML syntax") switched
from the bare toolchain file to the TOML-based one for better management
of the toolchain and components used.

Commit 1cb61e6918 ("deps.sh: Update rustup or inform user of env
vars") added an explicit `rustup self update` because there were still
cases, a year later, of people not having a rustup new enough to support
the TOML-based toolchain file.

Now 2 years after that, it should be safe to drop the explicit self
update. The TOML format has widespread adoption and rustup now self
updates by default. This should allow distro-provided rustup, which
disables the self update feature, to work if it is already installed in
place of the one downloaded from https://rustup.rs.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-03-18 14:20:31 -06:00
7205f1a49e Add shellcheck lint
Run shellcheck [1] on the bash files.

[1]: https://www.shellcheck.net/

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-18 13:52:14 -07:00
58f9ed4051 Run lints at pre-commit
Install a hook to run lints at pre-commit to force issues to be fixed
during development.

This introduces a 5-10 second delay when committing due to how slow
clang-format is.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-18 13:52:14 -07:00
04df6ae311 Add .clang-format
Most options are configured to keep most of the current style.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-03-22 12:52:47 -06:00
1cb61e6918 deps.sh: Update rustup or inform user of env vars
Ensure rustup is up-to-date to avoid users having a version that is too
old to support the TOML format.

If rustup was just installed, tell the user to source the new env vars
to use the correct version of the toolchain.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-01-18 08:09:56 -07:00
e8ce6d9096 Add libhidapi-dev to deps 2021-11-17 18:26:26 -07:00
3fe0e2f4e4 Add hidapi deps
ectool uses hidapi, which requires cc and pkg-config to be available.

This fixes building ectool on a minimal install system.
2021-05-25 09:15:02 -06:00
aa880033e3 Add missing xxd dep 2021-05-14 12:48:34 -06:00
316376c271 Add deps for Arch Linux 2021-05-14 12:48:34 -06:00
1ea21aedbe deps.sh: Run apt-get update
Hopefully this will fix the CI tests. This is a common enough issue on
CI that Travis mentions it in their documentation:
https://docs.travis-ci.com/user/common-build-problems/#linux-apt-fails-to-install-package-with-404-error
2021-04-13 11:04:51 -06:00
17f8e37ed5 Convert toolchain file to TOML syntax
rustup 1.23.0 (2020-11-27) introduced support for TOML syntax for the
toolchain file. Use this and specify required compoenents.

To ensure you are using a new enough rustup, run:

    rustup self update
2021-03-15 10:09:42 -06:00
340ddd2e81 deps: Install libudev 2021-02-23 09:29:16 -07:00
ba99aec1b7 deps: Skip installing Rust if rustup is available
Saves time and prevents errors with trying to install rustup twice or
potentially overriding the user's default toolchain.
2021-02-22 16:26:14 -07:00
55b6256ed6 Add script for installing dependencies 2021-02-22 09:04:50 -07:00