From 994dca2f85e1fe33bbad28c1895b8ad56c70cab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Mon, 1 Jul 2024 15:44:46 +0200 Subject: [PATCH 1/8] Make install an optional dependency --- www/install.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/www/install.sh b/www/install.sh index 2f0755da22..dc6e6ea325 100755 --- a/www/install.sh +++ b/www/install.sh @@ -62,6 +62,17 @@ download() { fi } +install_just() { + src="$1" + dst="$2" + if command -v install > /dev/null; then + install -m 755 "$src" "$dest" + else + cp "$src" "$dst" + chmod 755 "$dst" + fi +} + force=false while test $# -gt 0; do case $1 in @@ -97,7 +108,6 @@ command -v curl > /dev/null 2>&1 || command -v wget > /dev/null 2>&1 || err "need wget or curl (command not found)" -need install need mkdir need mktemp need tar @@ -171,7 +181,7 @@ if [ -e "$dest/just" ] && [ "$force" = false ]; then err "\`$dest/just\` already exists" else mkdir -p "$dest" - install -m 755 "$td/just" "$dest" + install_just "$td/just" "$dest" fi rm -rf "$td" From 71bb87f12182c67186ffe6daa84c46bb4963de6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Mon, 1 Jul 2024 15:45:09 +0200 Subject: [PATCH 2/8] add 32-bit arm targets --- www/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/install.sh b/www/install.sh index dc6e6ea325..45180c3c36 100755 --- a/www/install.sh +++ b/www/install.sh @@ -142,6 +142,8 @@ if [ -z "${target-}" ]; then case $uname_target in aarch64-Linux) target=aarch64-unknown-linux-musl;; + armv7l-Linux) target=armv7-unknown-linux-musleabihf;; + armv6l-Linux) target=arm-unknown-linux-musleabihf;; arm64-Darwin) target=aarch64-apple-darwin;; x86_64-Darwin) target=x86_64-apple-darwin;; x86_64-Linux) target=x86_64-unknown-linux-musl;; From dad894b27b6c40c0cffc2fd16789fa9806f83fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Mon, 1 Jul 2024 19:41:05 +0200 Subject: [PATCH 3/8] move need tar for when it is needed --- www/install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/www/install.sh b/www/install.sh index 45180c3c36..ae65c2eb92 100755 --- a/www/install.sh +++ b/www/install.sh @@ -110,7 +110,6 @@ command -v curl > /dev/null 2>&1 || need mkdir need mktemp -need tar if [ -z "${tag-}" ]; then need grep @@ -157,8 +156,8 @@ if [ -z "${target-}" ]; then fi case $target in - x86_64-pc-windows-msvc) extension=zip; need unzip;; - *) extension=tar.gz;; + x86_64-pc-windows-msvc) extension=zip; need unzip;; + *) extension=tar.gz need tar;; esac archive="$releases/download/$tag/$crate-$tag-$target.$extension" From 6fd99a1d1fc0127ea05892d55217392b72e86717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Mon, 1 Jul 2024 19:42:31 +0200 Subject: [PATCH 4/8] use cp and chmod instead of install --- www/install.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/www/install.sh b/www/install.sh index ae65c2eb92..f883fc02d0 100755 --- a/www/install.sh +++ b/www/install.sh @@ -62,17 +62,6 @@ download() { fi } -install_just() { - src="$1" - dst="$2" - if command -v install > /dev/null; then - install -m 755 "$src" "$dest" - else - cp "$src" "$dst" - chmod 755 "$dst" - fi -} - force=false while test $# -gt 0; do case $1 in @@ -182,7 +171,8 @@ if [ -e "$dest/just" ] && [ "$force" = false ]; then err "\`$dest/just\` already exists" else mkdir -p "$dest" - install_just "$td/just" "$dest" + cp "$td/just" "$dest" + chmod 755 "$dest" fi rm -rf "$td" From d4c4809588bbaa9e48063d9b63b2388bc6312ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Mon, 1 Jul 2024 19:44:51 +0200 Subject: [PATCH 5/8] fix missing semi-colon --- www/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/install.sh b/www/install.sh index f883fc02d0..e1ab0ffc53 100755 --- a/www/install.sh +++ b/www/install.sh @@ -145,8 +145,8 @@ if [ -z "${target-}" ]; then fi case $target in - x86_64-pc-windows-msvc) extension=zip; need unzip;; - *) extension=tar.gz need tar;; + x86_64-pc-windows-msvc) extension=zip; need unzip;; + *) extension=tar.gz; need tar;; esac archive="$releases/download/$tag/$crate-$tag-$target.$extension" From 976a6d69facfdbcb887afe5955ab155071784046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Mon, 1 Jul 2024 19:51:55 +0200 Subject: [PATCH 6/8] target the just binary instead of the destination directory --- www/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/install.sh b/www/install.sh index e1ab0ffc53..28f18473de 100755 --- a/www/install.sh +++ b/www/install.sh @@ -171,8 +171,8 @@ if [ -e "$dest/just" ] && [ "$force" = false ]; then err "\`$dest/just\` already exists" else mkdir -p "$dest" - cp "$td/just" "$dest" - chmod 755 "$dest" + cp "$td/just" "$dest/just" + chmod 755 "$dest/just" fi rm -rf "$td" From 7b9c16d171ee51ea0e14bde95c6756570a0744f8 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 1 Jul 2024 11:33:41 -0700 Subject: [PATCH 7/8] Enhance --- www/install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/www/install.sh b/www/install.sh index 28f18473de..d62af7accd 100755 --- a/www/install.sh +++ b/www/install.sh @@ -129,12 +129,12 @@ if [ -z "${target-}" ]; then uname_target="$(uname -m)-$kernel" case $uname_target in - aarch64-Linux) target=aarch64-unknown-linux-musl;; - armv7l-Linux) target=armv7-unknown-linux-musleabihf;; - armv6l-Linux) target=arm-unknown-linux-musleabihf;; - arm64-Darwin) target=aarch64-apple-darwin;; - x86_64-Darwin) target=x86_64-apple-darwin;; - x86_64-Linux) target=x86_64-unknown-linux-musl;; + aarch64-Linux) target=aarch64-unknown-linux-musl;; + arm64-Darwin) target=aarch64-apple-darwin;; + armv6l-Linux) target=arm-unknown-linux-musleabihf;; + armv7l-Linux) target=armv7-unknown-linux-musleabihf;; + x86_64-Darwin) target=x86_64-apple-darwin;; + x86_64-Linux) target=x86_64-unknown-linux-musl;; x86_64-MINGW64_NT) target=x86_64-pc-windows-msvc;; x86_64-Windows_NT) target=x86_64-pc-windows-msvc;; *) @@ -145,8 +145,8 @@ if [ -z "${target-}" ]; then fi case $target in - x86_64-pc-windows-msvc) extension=zip; need unzip;; - *) extension=tar.gz; need tar;; + x86_64-pc-windows-msvc) extension=zip; need unzip;; + *) extension=tar.gz; need tar;; esac archive="$releases/download/$tag/$crate-$tag-$target.$extension" From 86295c907314eb254470e19e8c809ba95f4bea93 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 1 Jul 2024 11:34:44 -0700 Subject: [PATCH 8/8] Modify --- www/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/install.sh b/www/install.sh index d62af7accd..83c1fbe606 100755 --- a/www/install.sh +++ b/www/install.sh @@ -15,7 +15,7 @@ help() { Install a binary release of a just hosted on GitHub USAGE: - install [options] + install.sh [options] FLAGS: -h, --help Display this message