feat: enable pre-commit checks

This commit is contained in:
Michael Mandl 2024-07-10 13:40:41 +02:00
parent c2afb2c5d1
commit a13a15cbd9
Signed by: mandlm
GPG key ID: 088ED38F036C7AF2
12 changed files with 110 additions and 26 deletions

View file

@ -2,8 +2,8 @@
{
programs.zsh.initExtra = ''
if [ -f $HOME/.nix-profile/etc/profile.d/nix.sh ];
then
source $HOME/.nix-profile/etc/profile.d/nix.sh
then
source $HOME/.nix-profile/etc/profile.d/nix.sh
fi
function sc-log {
@ -24,16 +24,16 @@
if [ -z ''${update_file} ]; then
update_file=$(find build/tmp/deploy/images -name "*.swu" -type f | fzf --select-1)
fi
fi
if [ -z ''${update_file} ]; then
echo "no file selected"
return 1
echo "no file selected"
return 1
fi
if [ ! -f ''${update_file} ]; then
echo "file \"''${update_file}\" does not exist"
return 2
echo "file \"''${update_file}\" does not exist"
return 2
fi
echo "flashing ''${update_file} to device..."