Commit 18a9acc9 authored by nimrod's avatar nimrod
Browse files

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

parent 3c7170b5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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/ \;
+2 −0
Original line number Diff line number Diff line
@@ -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) ))
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ then
    exit 0
fi

# shellcheck disable=SC1090
. "$filepath"

if [ "$current" -gt "$max" ]