Skip to content

Commit

Permalink
check if bin exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Ujstor committed Sep 17, 2024
1 parent eb7abcc commit 39254c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/template/framework/files/makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ templ-install:
{{- if .AdvancedOptions.tailwind}}
{{- if .OSCheck.UnixBased}}
tailwind:
{{ if .OSCheck.linux }}@curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 -o tailwindcss{{- end }}
{{ if .OSCheck.darwin }}@curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-macos-x64 -o tailwindcss{{- end }}
{{ if .OSCheck.linux }}@if [ ! -f tailwindcss ]; then curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 -o tailwindcss; fi{{- end }}
{{ if .OSCheck.darwin }}@if [ ! -f tailwindcss ]; then curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-macos-x64 -o tailwindcss; fi{{- end }}
@chmod +x tailwindcss
{{- else }}
tailwind:
@powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri 'https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-windows-x64.exe' -OutFile 'tailwindcss.exe'"{{- end }}
@if not exist tailwindcss.exe powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri 'https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-windows-x64.exe' -OutFile 'tailwindcss.exe'"{{- end }}
{{- end }}

build:{{- if .AdvancedOptions.tailwind }} tailwind{{- end }}{{- if or .AdvancedOptions.htmx .AdvancedOptions.tailwind }} templ-install{{- end }}
Expand Down

0 comments on commit 39254c0

Please sign in to comment.