File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,9 +166,9 @@ FreeBSD builds are tested in [Cirrus CI](https://cirrus-ci.org/) and cross-compi
166166VERSION=v0.2.0
167167RELEASE_URL=https://github.com/IvanIsCoding/celq/releases/download/${VERSION}
168168
169- fetch ${RELEASE_URL}/celq-x86_64-unknown- freebsd.tar.gz
169+ fetch ${RELEASE_URL}/celq-freebsd-x86_64 .tar.gz
170170
171- tar xzf celq-x86_64-unknown- freebsd.tar.gz
171+ tar xzf celq-freebsd-x86_64 .tar.gz
172172su root -c 'install -m 755 celq /usr/local/bin/'
173173` ` `
174174
Original file line number Diff line number Diff line change @@ -178,9 +178,9 @@ FreeBSD builds are tested in [Cirrus CI](https://cirrus-ci.org/) and cross-compi
178178VERSION=v0.2.0
179179RELEASE_URL=https://github.com/IvanIsCoding/celq/releases/download/${VERSION}
180180
181- fetch ${RELEASE_URL}/celq-x86_64-unknown- freebsd.tar.gz
181+ fetch ${RELEASE_URL}/celq-freebsd-x86_64 .tar.gz
182182
183- tar xzf celq-x86_64-unknown- freebsd.tar.gz
183+ tar xzf celq-freebsd-x86_64 .tar.gz
184184su root -c 'install -m 755 celq /usr/local/bin/'
185185` ` `
186186
Original file line number Diff line number Diff line change 2929
3030OPTIONS:
3131 --to LOCATION Where to install the binary [default: $CARGO_HOME/bin, $HOME/.cargo/bin, $HOME/.local/bin or $HOME/bin]
32- --target TARGET
32+ --target TARGET Following Rust target triple conventions (e.g. x86_64-unknown-linux-gnu).
3333 --verify-attestation Verify the binary's GitHub Actions attestation (requires GitHub CLI with authentication)
3434EOF
3535}
@@ -87,6 +87,24 @@ check_attestation() {
8787 return 0
8888}
8989
90+ # Map Rust target triple to pretty download name
91+ target_to_pretty_name () {
92+ local rust_target=" $1 "
93+
94+ case " $rust_target " in
95+ aarch64-apple-darwin) echo " macos-aarch64" ;;
96+ x86_64-apple-darwin) echo " macos-x86_64" ;;
97+ x86_64-pc-windows-msvc) echo " windows-x86_64" ;;
98+ x86_64-unknown-linux-musl) echo " linux-x86_64-musl" ;;
99+ aarch64-unknown-linux-musl) echo " linux-aarch64-musl" ;;
100+ x86_64-unknown-linux-gnu) echo " linux-x86_64-gnu" ;;
101+ aarch64-unknown-linux-gnu) echo " linux-aarch64-gnu" ;;
102+ * )
103+ err " Unsupported target: $rust_target "
104+ ;;
105+ esac
106+ }
107+
90108force=false
91109verify_attestation=false
92110while test $# -gt 0; do
@@ -173,12 +191,15 @@ if [ -z "${target-}" ]; then
173191 esac
174192fi
175193
194+ # Convert target to pretty name for download URL
195+ pretty_target=$( target_to_pretty_name " $target " )
196+
176197case $target in
177198 x86_64-pc-windows-msvc) extension=zip; need unzip;;
178199 * ) extension=tar.gz; need tar;;
179200esac
180201
181- archive=" $releases /download/{{CELQ_VERSION}}/$crate -$target .$extension "
202+ archive=" $releases /download/{{CELQ_VERSION}}/$crate -$pretty_target .$extension "
182203
183204say " Repository: $url "
184205say " Crate: $crate "
You can’t perform that action at this time.
0 commit comments