Skip to content
Snippets Groups Projects
Commit 15bf3c4e authored by nimrod's avatar nimrod
Browse files

- Added more shell scripts to pre-commit, silenced some false positives.

parent 1198c672
Branches
No related tags found
No related merge requests found
......@@ -9,6 +9,6 @@
sha: v0.5.4
hooks:
- id: shell-lint
files: &shellscripts 'bashrc|post-merge|profile|docker-|train-wifi|renew-certs|dma-clean|gen-ssh-config|dconf-load|kavim-wifi'
files: &shellscripts 'bashrc|post-merge|profile|docker-|train-wifi|renew-certs|dma-clean|gen-ssh-config|dconf-load|kavim-wifi|install-git-hooks|pocketchip-battery|update-voltage'
- id: shellcheck
files: *shellscripts
......@@ -2,4 +2,4 @@
set -eu
cd "$HOME/.githooks"
find -type f -exec ln -sf ../../.githooks/{} ../.git/hooks/ \;
find . -type f -exec ln -sf ../../.githooks/{} ../.git/hooks/ \;
......@@ -3,6 +3,8 @@ set -eu
current="$(cat /usr/lib/pocketchip-batt/voltage)"
# shellcheck disable=SC1090
. "$HOME/.local/voltage"
# shellcheck disable=SC2154
echo $(( 100 * (current - min) / (max - min) ))
......@@ -21,6 +21,7 @@ then
exit 0
fi
# shellcheck disable=SC1090
. "$filepath"
if [ "$current" -gt "$max" ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment