vault backup: 2025-11-16 09:55:06
This commit is contained in:
1 file changed
+10
-9
@@ -60,12 +60,13 @@ help-table() {
|
||||
local opt_width=6
|
||||
local desc_width=40
|
||||
local column="| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n"
|
||||
printf "$column" "Command" "Option" "Description"
|
||||
|
||||
printf "$column" 'Command' 'Option' 'Description'
|
||||
echo "|$(printf '%*s' $((cmd_width + 2)) '' | tr ' ' '-')|$(printf '%*s' $((opt_width + 2)) '' | tr ' ' '-')|$(printf '%*s' $((desc_width + 2)) '' | tr ' ' '-')|"
|
||||
printf "$column" "help" "[grep]" "Show help for commands."
|
||||
printf "$column" "install" "" "Setup the local environment."
|
||||
printf "$column" "lint" "" "Run pre-commit and update index.html."
|
||||
printf "$column" "version" "" "Show version of required tools."
|
||||
printf "$column" 'help' '[grep]' 'Show help for commands.'
|
||||
printf "$column" 'install' '' 'Setup the local environment.'
|
||||
printf "$column" 'lint' '' 'Run pre-commit and update index.html.'
|
||||
printf "$column" 'version' '' 'Show version of required tools.'
|
||||
}
|
||||
|
||||
help() {
|
||||
@@ -73,9 +74,9 @@ help() {
|
||||
if [[ -n "$1" ]]; then
|
||||
help-table | grep -i "$1" | column -t -s'|'
|
||||
else
|
||||
echo "task <command> [options]"
|
||||
echo 'task <command> [options]'
|
||||
echo
|
||||
echo "commands:"
|
||||
echo 'commands:'
|
||||
echo
|
||||
help-table
|
||||
fi
|
||||
@@ -91,7 +92,7 @@ version() {
|
||||
}
|
||||
|
||||
install() {
|
||||
echo "Setup venv and install python dependencies"
|
||||
echo 'Setup venv and install python dependencies'
|
||||
uv venv env
|
||||
source env/bin/activate
|
||||
uv pip install pre-commit
|
||||
@@ -100,7 +101,7 @@ install() {
|
||||
lint() {
|
||||
source env/bin/activate
|
||||
|
||||
echo "Run pre-commit"
|
||||
echo 'Run pre-commit'
|
||||
pre-commit run --all-file
|
||||
}
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user