Skip to content

Commit

Permalink
Merge pull request #109 from giusdp/uutils
Browse files Browse the repository at this point in the history
feat: add coreutils binary
  • Loading branch information
francescotimperi authored Jan 11, 2024
2 parents 10f8ed5 + b006ffb commit 8892895
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions bin/nuvfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tasks:
download:
dir: "{{.BIN}}"
cmds:
- curl -L -ccookie.txt -o{{.TGT}} {{.SRC}}
- curl -sL -ccookie.txt -o{{.TGT}} {{.SRC}}
- '{{if eq .OS "windows"}}mv {{.TGT}} {{.TGT}}.exe{{else}}chmod +x {{.TGT}}{{end}}'
- rm cookie.txt
status:
Expand Down Expand Up @@ -182,7 +182,7 @@ tasks:
dir: "{{.BIN}}"
cmds:
- task: unzip.exe
- curl -L -ccookie.txt -o{{.TGT}}{{.ARC}} {{.SRC}}
- curl -sL -ccookie.txt -o{{.TGT}}{{.ARC}} {{.SRC}}
- '{{if eq .OS "windows"}}unzip.exe {{.TGT}}{{.ARC}}{{else}}/usr/bin/tar xvzf {{.TGT}}{{.ARC}}{{end}}'
- '{{if eq .OS "darwin"}} mv ntfy_2.7.0_{{.OS}}_all/{{.TGT}} . {{else}} mv ntfy_2.7.0_{{.OS}}_{{.ARCH}}/{{.TGT}}{{.EXE}} . {{end}}'
- '{{if eq .OS "darwin"}} rm -r {{.TGT}}{{.ARC}} ntfy_2.7.0_{{.OS}}_all/* {{else}} rm -r {{.TGT}}{{.ARC}} ntfy_2.7.0_{{.OS}}_{{.ARCH}}/* {{end}}'
Expand All @@ -191,6 +191,32 @@ tasks:
status:
- test -e {{.TGT}}{{.EXE}}

coreutils:
vars:
BASE: "https://github.com/uutils/coreutils/releases/download/0.0.23/coreutils-0.0.23-"
SRC:
sh: >
case {{.OS}}-{{.ARCH}} in
(linux-amd64) echo {{.BASE}}x86_64-unknown-linux-gnu.tar.gz ;;
(linux-arm64) echo {{.BASE}}aarch64-unknown-linux-gnu.tar.gz ;;
(darwin-amd64) echo {{.BASE}}x86_64-apple-darwin.tar.gz ;;
(darwin-arm64) echo {{.BASE}}aarch64-apple-darwin.tar.gz ;;
(windows-amd64) echo {{.BASE}}x86_64-pc-windows-msvc.zip ;;
esac
TGT: coreutils
dir: "{{.BIN}}"
cmds:
- task: unzip.exe
- curl -sL -ccookie.txt -o{{.TGT}}{{.ARC2}} {{.SRC}}
- rm cookie.txt
- mkdir {{.TGT}}-extract
- '{{if eq .OS "windows"}}unzip.exe {{.TGT}}{{.ARC2}}{{else}}/usr/bin/tar xvzf {{.TGT}}{{.ARC2}} -C {{.TGT}}-extract --strip-components{{end}}'
- '{{if eq .OS "windows"}} mv coreutils-0.0.23-x86_64-pc-windows-msvc/{{.TGT}}{{EXE}} . {{else}} mv {{.TGT}}-extract/{{.TGT}}{{.EXE}} . {{end}}'
- '{{if eq .OS "windows"}} rm -r coreutils-0.0.23-x86_64-pc-windows-msvc {{else}} rm -r {{.TGT}}-extract {{end}}'
- rm -r {{.TGT}}{{.ARC2}}
status:
- test -e {{.TGT}}{{.EXE}}

echo-download-archive: echo "{{.SRC}}"

helm:
Expand Down

0 comments on commit 8892895

Please sign in to comment.