Compare commits

...

4 Commits

Author SHA1 Message Date
Edwin Kofler 8da0f1d5bc
Merge 7b2e28d47c into bcf78f74be 2023-12-01 03:21:47 -07:00
Ryan Delaney bcf78f74be
Merge pull request #211 from fox-forks/hyperupcall-tests
test: Add regression test for non-existent env var
2023-11-30 13:49:51 -05:00
Edwin Kofler b3b993f2ae
test: Add regression test for non-existent env var 2023-11-27 03:09:42 -08:00
Edwin Kofler 7b2e28d47c
fix: Makefile syntax and whitespace quoting
Signed-off-by: Edwin Kofler <edwin@kofler.dev>
2023-11-18 15:37:59 -08:00
5 changed files with 30 additions and 6 deletions

View File

@ -13,5 +13,8 @@ charset = utf-8
[*.sh]
indent_size = 2
[*.{yaml,yml}]
indent_size = 2
[Makefile]
indent_style = tab

17
.github/workflows/tests.yaml vendored Normal file
View File

@ -0,0 +1,17 @@
---
name: 'Run Tests'
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: 'Execute tests'
run: './run_tests'

View File

@ -20,5 +20,4 @@ repos:
additional_dependencies:
- mdformat-gfm
- mdformat-toc
# EOF

View File

@ -1,7 +1,7 @@
export LC_ALL=C
FILE_NAME=lscolors
export XDG_DATA_HOME ?= $${$$HOME/.local/share}
XDG_DATA_HOME ?= $(HOME)/.local/share
XDG_DATA_HOME := "$(XDG_DATA_HOME)"
all: generate
clean:
@ -13,11 +13,11 @@ generate: clean
@command sort LS_COLORS | dircolors --c-shell - > ${FILE_NAME}.csh
install: generate
@command cp ${FILE_NAME}.sh ${FILE_NAME}.csh ${XDG_DATA_HOME}
@command cp ${FILE_NAME}.sh ${FILE_NAME}.csh $(XDG_DATA_HOME)
@echo "To enable the colors, add the following line to your shell's start-up script:"
@echo ""
@echo "For Bourne shell (e.g. ~/.bashrc or ~/.zshrc):"
@echo " source ${XDG_DATA_HOME}/${FILE_NAME}.sh"
@echo " source $(XDG_DATA_HOME)/${FILE_NAME}.sh"
@echo ""
@echo "For C shell (e.g. ~/.cshrc):"
@echo " source ${XDG_DATA_HOME}/${FILE_NAME}.csh"
@echo " source $(XDG_DATA_HOME)/${FILE_NAME}.csh"

5
tests/works_without_env Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
#
unset -v XDG_DATA_HOME
make install