Skip to content

Commit

Permalink
Made .githooks/pre-commit more verbose.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Oct 8, 2023
1 parent 5e38416 commit da62c61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ do
fi
else
echo "Skipping formatting of $FILE"
if [[ $FILE == *.sh || $FILE == .py || $FILE == .rb ||
if [[ $FILE == *.sh || $FILE == *.py || $FILE == *.rb ||
$FILE == *pre-commit ]]; then
if [[ -e $FILE ]]; then
echo "Changing $FILE permissions to 0755"
chmod 0755 $FILE
fi
else
if [[ -d $FILE ]]; then
chmod 0755 $FILE
elif [[ -e $FILE ]]; then
chmod 0644 $FILE
echo "Changing $FILE permissions to 0644"
chmod 0644 $FILE
fi
fi
fi
Expand Down

0 comments on commit da62c61

Please sign in to comment.